aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb/fd_sanitize.c
blob: ea290896cf5899bb0132920c18badb12f96a0e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <skalibs/djbunix.h>

int fd_sanitize (void)
{
  if (!fd_ensure_open(2, 1)) return 0 ;
  if (!fd_ensure_open(1, 1)) return 0 ;
  if (!fd_ensure_open(0, 0)) return 0 ;
  return 1 ;
}