Mercurial > dropbear
comparison scpmisc.c @ 1387:e7f11ed5fe28
Use DROPBEAR_PATH_DEVNULL instead of undefined _PATH_DEVNULL
author | Ben Gardner <bgardner@wabtec.com> |
---|---|
date | Tue, 24 May 2016 17:34:10 -0500 |
parents | 5dde22e8a189 |
children | 9579377b5f8b |
comparison
equal
deleted
inserted
replaced
1300:4fb9261ef02a | 1387:e7f11ed5fe28 |
---|---|
233 void | 233 void |
234 sanitise_stdfd(void) | 234 sanitise_stdfd(void) |
235 { | 235 { |
236 int nullfd, dupfd; | 236 int nullfd, dupfd; |
237 | 237 |
238 if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { | 238 if ((nullfd = dupfd = open(DROPBEAR_PATH_DEVNULL, O_RDWR)) == -1) { |
239 fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); | 239 fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); |
240 exit(1); | 240 exit(1); |
241 } | 241 } |
242 while (++dupfd <= 2) { | 242 while (++dupfd <= 2) { |
243 /* Only clobber closed fds */ | 243 /* Only clobber closed fds */ |