autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

exec 0</dev/null vs. nohup?


From: Jay K
Subject: exec 0</dev/null vs. nohup?
Date: Wed, 26 May 2010 13:17:39 +0000

I don't have the full background any longer, but I made
this change to a configure script:


before:

exec 7<&0 </dev/null 6>&1

after:


exec 6>&1


my comment at the time (2008-06-03) was:
take minor change to older boilerplate from other nearby
 configure files, in order to let it work under "nohup", on OpenBSD
 otherwise there is an error about an invalid file handle
 
 
 Make sense?


Clearly you are doing this on purpose though.

general.m4:

# File Descriptors
# ----------------
# Set up the file descriptors used by `configure'.
# File descriptor usage:
# 0 standard input (/dev/null)
# 1 file creation
# 2 errors and warnings
# AS_MESSAGE_LOG_FD compiler messages saved in config.log
# AS_MESSAGE_FD checking for... messages and results
# AS_ORIGINAL_STDIN_FD original standard input (still open)
.
.
.
# stdin is /dev/null because checks that run programs may
# inadvertently run interactive ones, which would stop configuration
# until someone typed an EOF.
.
.
.
exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1


Thoughts?

Maybe it just prints an error but there's no error?

I just did a quick experiment with just

exec 0</dev/null

and nohup but couldn't get an error.

I've surely upgraded OpenBSD in the meantime.

Maybe I'll look into it more later...

  - Jay



                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]