Changeset 84 for trunk/src/sh_unix.c
- Timestamp:
- Jan 18, 2007, 8:23:38 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_unix.c
r78 r84 1198 1198 */ 1199 1199 if (fdlimit < 0) 1200 fdlimit = 8; /* POSIX lower limit */1200 fdlimit = 20; /* POSIX lower limit */ 1201 1201 1202 1202 if (fdlimit > 65536) … … 1847 1847 sh_unix_zeroenv(); 1848 1848 1849 1850 /* close all file descriptors, and1851 * open first three streams to /dev/null1852 */1853 1849 if (goDaemon == 1) 1854 1850 { 1851 /* close all file descriptors 1852 */ 1855 1853 sh_unix_closeall (0, -1); /* if running as daemon */ 1856 aud_open(FIL__, __LINE__, SL_NOPRIV, _("/dev/null"), O_RDWR, 0); 1857 retry_aud_dup(FIL__, __LINE__, 0); 1858 retry_aud_dup(FIL__, __LINE__, 0); 1854 1855 /* Enable full error logging 1856 */ 1857 sh_error_only_stderr (S_FALSE); 1858 1859 /* open first three streams to /dev/null 1860 */ 1861 status = aud_open(FIL__, __LINE__, SL_NOPRIV, _("/dev/null"), O_RDWR, 0); 1862 if (status < 0) 1863 { 1864 status = errno; 1865 sh_error_handle((-1), FIL__, __LINE__, status, MSG_E_SUBGEN, 1866 sh_error_message(status), _("open")); 1867 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1868 } 1869 1870 status = retry_aud_dup(FIL__, __LINE__, 0); 1871 if (status >= 0) 1872 retry_aud_dup(FIL__, __LINE__, 0); 1873 1874 if (status < 0) 1875 { 1876 status = errno; 1877 sh_error_handle((-1), FIL__, __LINE__, status, MSG_E_SUBGEN, 1878 sh_error_message(status), _("dup")); 1879 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1880 } 1881 1859 1882 #if defined(HAVE_LIBPRELUDE) 1860 1883 sh_prelude_reset ();
Note:
See TracChangeset
for help on using the changeset viewer.