From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9180 invoked by alias); 29 Dec 2015 01:12:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37447 Received: (qmail 16943 invoked from network); 29 Dec 2015 01:12:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=TObWT9blWZMY+nYpeTK1vnlY8P+UnvvEZw7V5eXst9g=; b=o2C5OynB83SVCZxCmBnAquyyuC8l0oDahiAw1kZHeSbl85khlYrS0s/G93Y+qNl8UN W8TALZ/cHIpu+/7Xg+cYRJeaLx0leOS6hg7Jpgz5bDXKvmgniS2CAl/buSeIDS5/IJ3R KDbBJ+eWbau6yph3ZyNrFby9nSqSjddZz/5cUA3oessBj+9PPylXNVSey0s4ksTO0hLz k+KFkIDC65gNNwhOFjLri8Ov1ZVFX9bDOBnVRkANhArFDKS0c8Uw+ItEpvaKHItwCDH9 0PiTP4nFIxxBtBxO0kQx2JNqft/T+0OlHm4EDwSkS2Esv9YHKZ+TAWzRknYx77y92k8A YJpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=TObWT9blWZMY+nYpeTK1vnlY8P+UnvvEZw7V5eXst9g=; b=mATQjhpwwFGSyYKDrOFIpMWKUTbgRNNJun3A1/bZivaAVTemVGOs+M+PSgDyba0OHf CECyQcyk86A7M9/9YdoBUDQlVNC0yRREmRiepT8472aNChJVVWAnSi0XfqQohDNntKVS S99Ph9tXwZRIuDQjUCHIBOxD5Cmz604AOY/IiCu8FnWRUbGJ+jbspoMYAYRup1E0m9bx sZz5KBEDPxAof2zyJgtTRmFV5Xi7jgu4NvdTQs7uTEHc2+sWoh19JyL9fnA7CG45PraF vLbb4JZ2Tl3hMBSoBwn8VW9y5DDggNFIrbDLAQKwu4Mz+HhaFXVXLCmx2dujmimDysN2 rVdw== X-Gm-Message-State: ALoCoQmfbSIN5TxXmXav9fAPUldoTHi8QJmSdtR0pbX8cHkDHGpCAeytil3n/Wwaf/nw20GX3xJ1JRq4qz9rwkpQukinlyRpzA== X-Received: by 10.66.141.5 with SMTP id rk5mr34300152pab.66.1451351565234; Mon, 28 Dec 2015 17:12:45 -0800 (PST) From: Bart Schaefer Message-Id: <151228171334.ZM20343@torch.brasslantern.com> Date: Mon, 28 Dec 2015 17:13:34 -0800 In-Reply-To: <56819F48.7000209@gmail.com> Comments: In reply to Jacek Wielemborek "exec format error ignored?" (Dec 28, 9:44pm) References: <56819F48.7000209@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: exec format error ignored? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 28, 9:44pm, Jacek Wielemborek wrote: } } I found that "echo > ~/bin/some_test && some_test" doesn't show me any } error, but "strace some_test" says that execve failed. How is that? The shell traps the failed execve and attempts to run the file as a shell script instead. This silently succeeds (an empty line is the same as "true" for shell script purposes). This is standard for shells. [*] Conversely "strace" does not have this special-case run-script logic and reports the failed execve as an error. [*] All currently released versions of zsh will report an exec format error on an *empty* file, as opposed to a file containing a single newline. This will be fixed in a forthcoming release.