arc1@ukc.ac.uk (A.R.Curtis) (04/07/89)
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