* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: token.c,v 1.22.8.3 2003/10/22 17:32:33 kovert Exp $
+ * $Id: token.c,v 1.29 2006/01/14 04:37:19 paddy_s Exp $
*
* token bashing routines
*/
/* Format the token */
arglist_start(argp, format);
- ap_vsnprintf(linebuf, sizeof(linebuf), format, argp);
+ vsnprintf(linebuf, sizeof(linebuf), format, argp);
arglist_end(argp);
return quote(" ", linebuf);
/* Format the token */
arglist_start(argp, format);
- ap_vsnprintf(linebuf, sizeof(linebuf), format, argp);
+ vsnprintf(linebuf, sizeof(linebuf), format, argp);
arglist_end(argp);
return quote(sep, linebuf);
return buf;
}
-#endif /* HAVE_SHQUOTE */
+#endif
/* Table lookup.
*/
int r;
char *sr;
int i;
- int fd;
-
- for(fd = 3; fd < FD_SETSIZE; fd++) {
- /*
- * Make sure nobody spoofs us with a lot of extra open files
- * that would cause an open we do to get a very high file
- * descriptor, which in turn might be used as an index into
- * an array (e.g. an fd_set).
- */
- close(fd);
- }
+
+ safe_fd(-1, 0);
set_pname("token test");
+ /* Don't die when child closes pipe */
+ signal(SIGPIPE, SIG_IGN);
+
erroutput_type = ERR_INTERACTIVE;
printf("Testing split() with \" \" token separator\n");