X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=cprogs%2Fprefork-interp.c;h=fb1be68389878b42bdf5dff92809744190db8513;hb=973e129f6ef4759609d45208003a0f50536984b4;hp=918083e321af6b48f69b7a5c2ccc5e46c5b54e4b;hpb=12aff8638653798a38e4712cafa46e1ef409b7a8;p=chiark-utils.git diff --git a/cprogs/prefork-interp.c b/cprogs/prefork-interp.c index 918083e..fb1be68 100644 --- a/cprogs/prefork-interp.c +++ b/cprogs/prefork-interp.c @@ -268,21 +268,24 @@ void fusagemessage(FILE *f) { fprintf(f, "usage: #!/usr/bin/prefork-interp []\n"); } -static int laundering; -static int mode; -static int max_sockets = 100; // maximum entries in the run dir is 2x this - -static struct stat initial_stab; - #define MODE_NORMAL 0 #define MODE_KILL 'k' #define MODE_FRESH 'f' +#define MEDIATION_UNSPECIFIED 0 +#define MEDIATION_UNLAUNDERED 'U' + +static int mediation = MEDIATION_UNSPECIFIED; +static int mode = MODE_NORMAL; +static int max_sockets = 100; // maximum entries in the run dir is 2x this + +static struct stat initial_stab; + const struct cmdinfo cmdinfos[]= { PREFORK_CMDINFOS - { 0, 'U', 0, .iassignto= &laundering, .arg= 'U' }, - { "kill", 0, 0, .iassignto= &mode, .arg= MODE_KILL }, - { 0, 'f', 0, .iassignto= &mode, .arg= MODE_FRESH }, + { 0, 'U', 0, .iassignto= &mediation, .arg= MEDIATION_UNLAUNDERED }, + { "kill", 0, 0, .iassignto= &mode, .arg= MODE_KILL }, + { 0, 'f', 0, .iassignto= &mode, .arg= MODE_FRESH }, { 0 } }; @@ -834,8 +837,8 @@ static void connect_or_spawn(void) { } static void make_executor_argv(const char *const *argv) { - switch (laundering) { - case 'U': break; + switch (mediation) { + case MEDIATION_UNLAUNDERED: break; default: die("need -U (specifying unlaundered argument handling)"); }