guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for (system '("echo" "foo" "bar"))


From: Paul Jarc
Subject: Re: Support for (system '("echo" "foo" "bar"))
Date: Fri, 31 Oct 2003 17:26:50 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

I wrote:
> (define (system*/ignore-signals . args)
>   (let* ((pid (apply system*/nowait args))
>          (old-int  (sigaction SIGINT  SIG_IGN))
>          (old-quit (sigaction SIGQUIT SIG_IGN))
>          (status (cdr (waitpid (apply system*/nowait args)))))
>     (sigaction SIGINT  (car old-int)  (cdr old-int))
>     (sigaction SIGQUIT (car old-quit) (cdr old-quit))
>     status))

Oops.  That should, of course, be:
(define (system*/ignore-signals . args)
  (let* ((pid (apply system*/nowait args))
         (old-int  (sigaction SIGINT  SIG_IGN))
         (old-quit (sigaction SIGQUIT SIG_IGN))
         (status (cdr (waitpid pid))))
    (sigaction SIGINT  (car old-int)  (cdr old-int))
    (sigaction SIGQUIT (car old-quit) (cdr old-quit))
    status))


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]