From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.help Subject: Re: A command ran from emacs receives a "signal 1" while it does not when run in a shell Date: Mon, 27 Sep 2004 23:09:11 +1000 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87r7oneu4o.fsf@enki.rimspace.net> References: <87u0tmovte.fsf@fleuret.homeunix.org> <87r7oo6k37.fsf@fleuret.homeunix.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1096293741 20694 80.91.229.6 (27 Sep 2004 14:02:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2004 14:02:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 27 16:02:04 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CBw4q-0001nx-00 for ; Mon, 27 Sep 2004 16:02:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CBwB2-0002IR-5g for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Sep 2004 10:08:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CBwAq-0002IK-CF for help-gnu-emacs@gnu.org; Mon, 27 Sep 2004 10:08:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CBwAn-0002HE-4g for help-gnu-emacs@gnu.org; Mon, 27 Sep 2004 10:08:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CBwAn-0002Gr-1A for help-gnu-emacs@gnu.org; Mon, 27 Sep 2004 10:08:13 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CBw4R-00027w-Gw for help-gnu-emacs@gnu.org; Mon, 27 Sep 2004 10:01:39 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CBw4L-0006S2-00 for ; Mon, 27 Sep 2004 16:01:33 +0200 Original-Received: from 203-217-29-45.perm.iinet.net.au ([203.217.29.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2004 16:01:33 +0200 Original-Received: from daniel by 203-217-29-45.perm.iinet.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2004 16:01:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-29-45.perm.iinet.net.au User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:fAqvKyJDcfcnjICwYfRV/hAwj84= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20910 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20910 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