if (logging) {
const char *fmt_use = fmt;
char *fmt_free = 0;
- if (errnoval) {
+ if (errnoval!=-1) {
r = asprintf(&fmt_free, "%s: %%m", fmt);
if (r) {
fmt_free = 0;
int i;
ident_addstring(0,interp);
- ident_addstring(0,script);
+ if (script)
+ ident_addstring(0,script);
sha256_digest(&identsc,sizeof(bbuf),bbuf);
for (i=0; i<identlen; i += 2)
const char *smashedopt;
sha256_init(&identsc);
+ ident_addinit();
if ((*argv_io)[0] &&
(smashedopt = (*argv_io)[1]) &&
shbang_opts(&split_argv, cmdinfos);
/* sets interp */
+
+ if (!**argv_io)
+ badusage("no script argument (expected after combined #! options)");
} else {
shbang_opts(argv_io, cmdinfos);
}