if (suffix == NULL) {
if ((tmpfil = m_mktemp2(NULL, pfx_in, fd_ret, fp_ret))) {
- return add(tmpfil, NULL);
- } else {
- return NULL;
+ return mh_xstrdup(tmpfil);
}
+ return NULL;
}
#if HAVE_MKSTEMPS
fd = mkstemps(tmpfil, (int) strlen(suffix));
#else /* ! HAVE_MKSTEMPS */
- /* Solaris 10, e.g. */
+ /* NetBSD, Solaris 10 */
if (pfx_in == NULL) {
tmpfil = concat(get_temp_dir(), "/nmhXXXXXX", NULL);
exit(1);
} else {
+ remove_registered_files_atexit();
+
act.sa_handler = SIG_DFL;
(void) sigemptyset(&act.sa_mask);
act.sa_flags = 0;
(void) sigaction(sig, &act, 0);
- remove_registered_files_atexit();
-
(void) raise(sig);
}
}