* A command ran from emacs receives a "signal 1" while it does not when run in a shell
@ 2004-09-25 21:58 François Fleuret
2004-09-27 11:13 ` François Fleuret
0 siblings, 1 reply; 4+ messages in thread
From: François Fleuret @ 2004-09-25 21:58 UTC (permalink / raw)
Hi,
I am trying to write an elisp application to control vlc, the
multi-media player and I have a weird bug.
Vlc can be run in such a mode that it gets commands in stdin and send
results in stdout. If ran from a bash shell (in an xterm), I can for
instance send it "add file://toto.mp3\n" and it will play the given
mp3, if I send "stop\n", it will stop playing and wait for more
commands.
If I set up a process in emacs with start-process, set-process-filter
and set-process-sentinel, and send the first string with
process-send-string, it will play the mp3. But if I send the second
string, it will stop and then it will tells me (in its stdout) "signal
1 received" and dies. The sentinel in emacs will get "finished".
Did I miss something here?
--
François Fleuret
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A command ran from emacs receives a "signal 1" while it does not when run in a shell
2004-09-25 21:58 A command ran from emacs receives a "signal 1" while it does not when run in a shell François Fleuret
@ 2004-09-27 11:13 ` François Fleuret
2004-09-27 13:09 ` Daniel Pittman
[not found] ` <mailman.4272.1096294098.1998.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: François Fleuret @ 2004-09-27 11:13 UTC (permalink / raw)
Hi,
François Fleuret wrote on 25 Sep 2004 22:58:05 MET:
> If I set up a process in emacs with start-process,
> set-process-filter and set-process-sentinel, and send the first
> string with process-send-string, it will play the mp3. But if I send
> the second string, it will stop and then it will tells me (in its
> stdout) "signal 1 received" and dies. The sentinel in emacs will get
> "finished".
If I invoke vlc through a wrapper shell-script of the form
,------------------
| #!/bin/bash
| vlc --intf rc
`------------------
there is no problem anymore. I do not understand a lot to the UNIX
signal handling thing, but is it possible that emacs sends a signal 1
to the invoked executable ?
Cheers,
--
François Fleuret
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A command ran from emacs receives a "signal 1" while it does not when run in a shell
2004-09-27 11:13 ` François Fleuret
@ 2004-09-27 13:09 ` Daniel Pittman
[not found] ` <mailman.4272.1096294098.1998.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Pittman @ 2004-09-27 13:09 UTC (permalink / raw)
On 27 Sep 2004, François Fleuret wrote:
> François Fleuret wrote on 25 Sep 2004 22:58:05 MET:
>
>> If I set up a process in emacs with start-process,
>> set-process-filter and set-process-sentinel, and send the first
>> string with process-send-string, it will play the mp3. But if I send
>> the second string, it will stop and then it will tells me (in its
>> stdout) "signal 1 received" and dies. The sentinel in emacs will get
>> "finished".
>
> If I invoke vlc through a wrapper shell-script of the form
>
> ,------------------
> | #!/bin/bash
> | vlc --intf rc
> `------------------
>
> there is no problem anymore. I do not understand a lot to the UNIX
> signal handling thing, but is it possible that emacs sends a signal 1
> to the invoked executable ?
Signal 1 is 'HUP' under Linux, at least, and under most Unix systems as
I recall. That is sent when the controlling terminal of an application
is closed.
If Emacs uses a pty to talk to the vlc instance, and that was closed
at some point, that would generate a SIGHUP to the application.
Using the shell presumably insulates from that in some fashion.
xine should probably not die when the controlling terminal is closed.
Daniel
--
The true way to overcome the evil of class distinctions is not to
denounce them as revolutionists denounce them, but to ignore them as
children ignore them.
-- Charles Dickens
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.4272.1096294098.1998.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2004-09-27 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-25 21:58 A command ran from emacs receives a "signal 1" while it does not when run in a shell François Fleuret
2004-09-27 11:13 ` François Fleuret
2004-09-27 13:09 ` Daniel Pittman
[not found] ` <mailman.4272.1096294098.1998.help-gnu-emacs@gnu.org>
2004-09-27 14:28 ` François Fleuret
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.