ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] multiple traps
@ 2005-09-14  7:43 Alexey Tourbin
  2005-09-14 13:12 ` [devel] " Michael Shigorin
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Tourbin @ 2005-09-14  7:43 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

Как поддерживать несколько трапов?

bash-2.05b$ trap 'echo 1' EXIT
bash-2.05b$ trap 'echo 2' EXIT
bash-2.05b$ exit
2
$

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [devel] Re: multiple traps
  2005-09-14  7:43 [devel] multiple traps Alexey Tourbin
@ 2005-09-14 13:12 ` Michael Shigorin
  2005-09-14 13:46   ` Alexey Tourbin
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Shigorin @ 2005-09-14 13:12 UTC (permalink / raw)
  To: devel

On Wed, Sep 14, 2005 at 11:43:54AM +0400, Alexey Tourbin wrote:
> Как поддерживать несколько трапов?

Как read тот, который был written?

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/
 ----       visit our conference (Oct 1):
--          http://conference.osdn.org.ua


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [devel] Re: multiple traps
  2005-09-14 13:12 ` [devel] " Michael Shigorin
@ 2005-09-14 13:46   ` Alexey Tourbin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Tourbin @ 2005-09-14 13:46 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

On Wed, Sep 14, 2005 at 04:12:04PM +0300, Michael Shigorin wrote:
> > Как поддерживать несколько трапов?
> Как read тот, который был written?

bash-2.05b$ trap 'echo 1' EXIT
bash-2.05b$ trap
trap -- 'echo 1' EXIT
bash-2.05b$ trap |cat
bash-2.05b$ trap -p
trap -- 'echo 1' EXIT
bash-2.05b$ trap -p |cat
bash-2.05b$ exit
1
$

#7610

(Хотя... если это пайп, то может быть `trap -p' исполняется в субшелле?
А для субшелла трапы вроде ресетятся... Надо подумать.)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-14 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-14  7:43 [devel] multiple traps Alexey Tourbin
2005-09-14 13:12 ` [devel] " Michael Shigorin
2005-09-14 13:46   ` Alexey Tourbin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git