Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!harrier.ukc.ac.uk!arc1 From: arc1@ukc.ac.uk (A.R.Curtis) Newsgroups: comp.os.minix Subject: Clam problem with shell scripts Message-ID: <591@harrier.ukc.ac.uk> Date: 7 Apr 89 15:14:46 GMT Reply-To: arc1@ukc.ac.uk (A.R.Curtis) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 21 For anyone having problems with clam and shcripts... With reference to the comments in clam about the way in which shell scripts get executed, I noted the following problem. Suppose, for the sake of argument, that "ls" is in fact a shcript which introduces the -F argument for you (/bin/ls -F $*). Calling ls from clam works fine, until you do "ls -l". then any subsequent calls to "ls" (or anything else I imagine) leave the "-l" arg intact. I tracked this down to exec.c, where the argument shuffling takes place when the first exec() call fails. The solution I adopted was to null-terminate argv[] by replacing the argc++ /* one more argument ... */ line with argv[argc++] = NULL; /* ... */ which is what should be there anyway I think. Tony Curtis