comparison cli-session.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 750ec4ec4cbe
children e8f67918fdc9
comparison
equal deleted inserted replaced
1300:4fb9261ef02a 1387:e7f11ed5fe28
285 285
286 if (cli_opts.backgrounded) { 286 if (cli_opts.backgrounded) {
287 int devnull; 287 int devnull;
288 /* keeping stdin open steals input from the terminal and 288 /* keeping stdin open steals input from the terminal and
289 is confusing, though stdout/stderr could be useful. */ 289 is confusing, though stdout/stderr could be useful. */
290 devnull = open(_PATH_DEVNULL, O_RDONLY); 290 devnull = open(DROPBEAR_PATH_DEVNULL, O_RDONLY);
291 if (devnull < 0) { 291 if (devnull < 0) {
292 dropbear_exit("Opening /dev/null: %d %s", 292 dropbear_exit("Opening /dev/null: %d %s",
293 errno, strerror(errno)); 293 errno, strerror(errno));
294 } 294 }
295 dup2(devnull, STDIN_FILENO); 295 dup2(devnull, STDIN_FILENO);