File: coe.c

package info (click to toggle)
tinyssh 20250501-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,388 kB
  • sloc: ansic: 20,245; sh: 1,582; python: 1,449; makefile: 913
file content (18 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
20241112
*/

#include <fcntl.h>
#include "coe.h"

/*
The 'coe_enable(fd)' function enables
the close-on-exec flag on a file-descriptor 'fd'.
*/
void coe_enable(int fd) { fcntl(fd, F_SETFD, 1); }

/*
The 'coe_disable(fd)' function disables
the close-on-exec flag on a file-descriptor 'fd'.
*/
void coe_disable(int fd) { fcntl(fd, F_SETFD, 0); }