DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 55ACJb652409342 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 55ACJb652409342 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=GKhdFbUQ X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69611385783C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1749557975; bh=xI5VYRahHto+sv6XtSwSkp0pbpd14vUen9s04F189E4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=GKhdFbUQ9rNT5TZRx+pxajVug1in53vVPjln7We10EWqeKpL1mtMwmPScW82XwxVv sPXxc/H3lZ4Cgpviv4bUKJfOoC1Pc6ouz1bYl693SqlA/EgXsr8/5sxjHZSKk1vIc8 HfQJLwsCI5hxs0MCOp9FrvWjixBQUUaoTTfCI52M= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E73E33857032 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E73E33857032 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749557907; cv=none; b=eZ3wzviOmQUpa4qhyOnzKT4nSAt6ftw6bKhi7VBtEGFErHFap6haQ81GCOGDQhWh0R2FnuuzlIz6YmcbpKR1gdH6g9lDKj95X4/wnnnLzGJiPhheyMWwe2sayraAJDn61RUJHOGrj51sRwqmiGqO7uwTLgdzR2XIHbYoOy8362Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749557907; c=relaxed/simple; bh=nsSIFxU/kHzHHp0ptgNR59e8iBiZmmLIKJzxX9d0Nu8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=IywbfrMzbMdXgQD2EDgSbjI8CXTkvli0qvlhXXRQcInCK6UELuWLAy+pfuVheqCPc6TaN/k17UCilZxsxppVZbYjY5fuWNfQBUFny0suoJNc1C1poYxlPDZi5/moAyjxiiNrWUTwyNJ+yn3sbfDRfH7cPtS5nFdPFfcSh3cjSAQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E73E33857032 X-ASG-Debug-ID: 1749557905-24039d08181c1370001-w5GHUG X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136 DKIM-Filter: OpenDKIM Filter v2.11.0 mailsrv.cs.umass.edu F10565E300 X-Barracuda-RBL-Trusted-Forwarder: 172.26.64.86 Message-ID: <95141527-168c-aa25-0287-1ec25e8e09c9@cs.umass.edu> Date: Tue, 10 Jun 2025 08:18:23 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Pseudo links to binaries do not work at all Content-Language: en-US X-ASG-Orig-Subj: Re: Pseudo links to binaries do not work at all To: Michael Wachs , cygwin AT cygwin DOT com References: In-Reply-To: X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136] X-Barracuda-Start-Time: 1749557905 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cs.umass.edu X-Barracuda-Scan-Msg-Size: 2214 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.7 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.142659 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Eliot Moss via Cygwin Reply-To: Eliot Moss Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 55ACJb652409342 On 6/10/2025 5:49 AM, Michael Wachs via Cygwin wrote: > Hello, > > I'm using a PC with Win11 and since few weeks the latest cygwin64 version. > > I've found that all pseudo links to binary files, which contain text aka "!{command}" do not work at all! > Neither interactive >     for example: >         /usr/bin/view >                 /usr/bin:[527]$ view >                 -bash: /usr/bin/view: cannot execute binary file: Exec format error > > nor in scripts or calling them from own code! > > I remove such files and replace them by real links with command "ln -fs ...", after that they work correctly! I can say that files that start this way work: #!/usr/bin/perl Note the # (not in your example). In my case, /usr/bin/perl is not a symlink but a path to an executable. I have verified that symlinks also work. One is allowed to put ONE option/argument after the path to the executable. Details from the man page for execve: Interpreter scripts An interpreter script is a text file that has execute permission enabled and whose first line is of the form: #!interpreter [optional-arg] The interpreter must be a valid pathname for an executable file. If the pathname argument of execve() specifies an interpreter script, then interpreter will be invoked with the following arguments: interpreter [optional-arg] pathname arg... where pathname is the absolute pathname of the file specified as the first argument of execve(), and arg... is the series of words pointed to by the argv argument of execve(), starting at argv[1]. Note that there is no way to get the argv[0] that was passed to the execve() call. For portable use, optional-arg should either be absent, or be specified as a single word (i.e., it should not contain white space); see NOTES below. Since Linux 2.6.28, the kernel permits the interpreter of a script to itself be a script. This permission is recursive, up to a limit of four recursions, so that the interpreter may be a script which is interpreted by a script, and so on. HTH - Eliot Moss -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple