From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 14 Apr 2006 23:34:32 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20060414193432.GC11323@localhost> Mail-Followup-To: ALT Devel discussion list References: <20060414154621.GA3423@localhost> <443FE885.7090807@altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mvpLiMfbWzRoNl4x" Content-Disposition: inline In-Reply-To: <443FE885.7090807@altlinux.org> Subject: Re: [devel] /bin/sh errexit semantics X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.7 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2006 19:34:46 -0000 Archived-At: List-Archive: List-Post: --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 14, 2006 at 10:23:01PM +0400, Alexey Rusakov wrote: > > =FE=C5=C7=CF =D1 =C9=CE=D4=D5=C9=D4=C9=D7=CE=CF =C8=CF=DE=D5: =DE=D4=CF= =C2=D9 =D0=D2=C9 =D7=D9=DA=CF=D7=C5 'func || =DE=D4=CF-=D4=CF' =C6=D5=CE=CB= =C3=C9=D1 func > > =CF=D4=D7=C1=CC=C9=CC=C1 =C2=D9 =CE=C1 =CB=CF=CD=C1=CE=C4=C5 false, =D4= .=C5. =D7=C5=D2=CE=D5=CC=C1 =C2=D9 =D3=D4=C1=D4=D5=D3 false, =C1 =DE=C1=D3= =D4=D8 > > "after false" =D7=D9=D0=CF=CC=CE=D1=D4=D8=D3=D1 =CE=C5 =C4=CF=CC=D6=CE= =C1. =F0=CF=DE=C5=CD=D5 =D1 =DC=D4=CF=C7=CF =C9=CE=D4=D5=C9=D4=C9=D7=CE=CF= =C8=CF=DE=D5? > > =E5=D3=CC=C9 =C2=D9 =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RoNl4x Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEP/lIfBKgtDjnu0YRAmyRAKCeB3Hf/8DRMv7lulS/wLJ8VbJTzACg2QvH Im96+pDrjY/htryyRUckIKU= =jsXp -----END PGP SIGNATURE----- --mvpLiMfbWzRoNl4x--