2010-05-14 00:26:56 +02:00
|
|
|
--- client/dhclient.c
|
|
|
|
+++ client/dhclient.c 2008/09/08 09:27:16
|
|
|
|
@@ -2659,6 +2659,12 @@ int script_go (client)
|
2007-07-21 17:29:24 +02:00
|
|
|
*/
|
|
|
|
if (leaseFile != NULL)
|
|
|
|
fclose(leaseFile);
|
2007-01-10 17:39:58 +01:00
|
|
|
+ if ((i = open("/dev/null", O_RDWR)) != -1) {
|
|
|
|
+ dup2(i, STDIN_FILENO);
|
|
|
|
+ dup2(i, STDOUT_FILENO);
|
|
|
|
+ if (i > STDERR_FILENO)
|
|
|
|
+ close(i);
|
|
|
|
+ }
|
|
|
|
execve (scriptName, argv, envp);
|
|
|
|
log_error ("execve (%s, ...): %m", scriptName);
|
|
|
|
exit (0);
|