X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=servexec.c;h=5597402ae97f714075859240206c890068e873aa;hp=8c3494a6673705a76eae97c89ca9044251d437b6;hb=5c38f6a9b5774073832e2b483b0c01b4f3261cb5;hpb=ccef06106c0b5e60fcbb9a636fd784638e9fc902 diff --git a/servexec.c b/servexec.c index 8c3494a..5597402 100644 --- a/servexec.c +++ b/servexec.c @@ -2,7 +2,7 @@ * userv - execserv.c * daemon code which executes actual service (ie child process) * - * Copyright (C)1996-1997,1999 Ian Jackson + * Copyright (C)1996-1997,1999-2001,2003 Ian Jackson * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -71,7 +71,7 @@ void bisexec_version(const char *const *argv) { const unsigned char *p; int i; - printf("uservd version " VERSION VEREXT "; copyright (C)1996-2000 Ian Jackson.\n" + printf("uservd version " VERSION VEREXT "\n" #ifdef DEBUG "DEBUGGING VERSION" #else @@ -93,7 +93,8 @@ void bisexec_version(const char *const *argv) { printf("\n" "rendezvous socket: `" RENDEZVOUSPATH "'\n" "system config dir: `" SYSTEMCONFIGDIR "'\n" - "pipe filename format: `%s' (max length %d)\n", + "pipe filename format: `%s' (max length %d)\n" + COPYRIGHT("","\n"), PIPEFORMAT, PIPEMAXLEN); serv_checkstdoutexit(); } @@ -250,7 +251,16 @@ void execservice(const int synchsocket[], int clientfd) { if (close(clientfd)) serv_syscallfail("close client socket fd"); - /* Now we have to make all the fd's work. It's rather a complicated + /* First we need to close the holding writing ends of the pipes + * inherited from our parent: */ + for (fd=0; fd= 0) fdarray[fdarray[fd].realfd].holdfd= fd;