}
#endif
-void
-request_sigio (void)
-{
-#ifdef USABLE_SIGIO
- sigset_t unblocked;
-
- if (noninteractive)
- return;
-
- sigemptyset (&unblocked);
-# ifdef SIGWINCH
- sigaddset (&unblocked, SIGWINCH);
-# endif
- sigaddset (&unblocked, SIGIO);
- pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
-
- interrupts_deferred = 0;
-#endif
-}
-
-void
-unrequest_sigio (void)
-{
-#ifdef USABLE_SIGIO
- sigset_t blocked;
-
- if (noninteractive)
- return;
-
- sigemptyset (&blocked);
-# ifdef SIGWINCH
- sigaddset (&blocked, SIGWINCH);
-# endif
- sigaddset (&blocked, SIGIO);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
- interrupts_deferred = 1;
-#endif
-}
-
void
ignore_sigio (void)
{
#ifdef SIGVTALRM
sigaction (SIGVTALRM, &process_fatal_action, 0);
#endif
-#ifdef SIGXCPU
- sigaction (SIGXCPU, &process_fatal_action, 0);
-#endif
#ifdef SIGXFSZ
sigaction (SIGXFSZ, &process_fatal_action, 0);
#endif
if (gr)
attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs);
- count = SPECPDL_INDEX ();
+ dynwind_begin ();
strcpy (fn, procfn);
procfn_end = fn + strlen (fn);
strcpy (procfn_end, "/stat");
attrs = Fcons (Fcons (Qpmem, make_float (pmem)), attrs);
}
}
- unbind_to (count, Qnil);
+ dynwind_end ();
/* args */
strcpy (procfn_end, "/cmdline");
if (fd >= 0)
{
ptrdiff_t readsize, nread_incr;
+ dynwind_begin ();
record_unwind_protect_int (close_file_unwind, fd);
- record_unwind_protect_nothing ();
nread = cmdline_size = 0;
do
{
cmdline = xpalloc (cmdline, &cmdline_size, 2, STRING_BYTES_BOUND, 1);
- set_unwind_protect_ptr (count + 1, xfree, cmdline);
/* Leave room even if every byte needs escaping below. */
readsize = (cmdline_size >> 1) - nread;
nread = cmdsize + 2;
cmdline_size = nread + 1;
q = cmdline = xrealloc (cmdline, cmdline_size);
- set_unwind_protect_ptr (count + 1, xfree, cmdline);
sprintf (cmdline, "[%.*s]", cmdsize, cmd);
}
/* Command line is encoded in locale-coding-system; decode it. */
cmd_str = make_unibyte_string (q, nread);
decoded_cmd = code_convert_string_norecord (cmd_str,
Vlocale_coding_system, 0);
- unbind_to (count, Qnil);
+ dynwind_end ();
attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs);
}
if (gr)
attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs);
- count = SPECPDL_INDEX ();
+ dynwind_begin ();
strcpy (fn, procfn);
procfn_end = fn + strlen (fn);
strcpy (procfn_end, "/psinfo");
Vlocale_coding_system, 0));
attrs = Fcons (Fcons (Qargs, decoded_cmd), attrs);
}
- unbind_to (count, Qnil);
+ dynwind_end ();
UNGCPRO;
return attrs;
}