… | |
… | |
222 | * Make our tty a controlling tty so that /dev/tty points to us |
222 | * Make our tty a controlling tty so that /dev/tty points to us |
223 | */ |
223 | */ |
224 | static int |
224 | static int |
225 | control_tty (int fd_tty) |
225 | control_tty (int fd_tty) |
226 | { |
226 | { |
227 | #ifndef __QNX__ |
|
|
228 | int fd; |
227 | int fd; |
229 | |
228 | |
230 | /* ---------------------------------------- */ |
229 | /* ---------------------------------------- */ |
231 | # ifdef HAVE_SETSID |
230 | # ifdef HAVE_SETSID |
232 | setsid (); |
231 | setsid (); |
… | |
… | |
286 | fd = open ("/dev/tty", O_WRONLY); |
285 | fd = open ("/dev/tty", O_WRONLY); |
287 | if (fd < 0) |
286 | if (fd < 0) |
288 | return -1; /* fatal */ |
287 | return -1; /* fatal */ |
289 | close (fd); |
288 | close (fd); |
290 | /* ---------------------------------------- */ |
289 | /* ---------------------------------------- */ |
291 | #endif /* ! __QNX__ */ |
|
|
292 | |
290 | |
293 | return 0; |
291 | return 0; |
294 | } |
292 | } |
295 | |
293 | |
296 | void |
294 | void |