Oui, un coup de strace ou de gdb sur le fichier montre qu'il n'est pas exécuté...
Et pour l'interpréteur de commande, POSIX dit « If the execve() function fails due to an error equivalent to the [ENOEXEC] error defined in the System Interfaces volume of IEEE Std 1003.1-2001, the shell shall execute a command equivalent to having a shell invoked with the pathname resulting from the search as its first operand, with any remaining arguments passed to the new shell, except that the value of "0ドル" in the new shell may be set to the command name. If the executable file is not a text file, the shell may bypass this command execution. In this case, it shall write an error message, and shall return an exit status of 126. »
"It is seldom that liberty of any kind is lost all at once." ― David Hume
[^] # Re: Benchmark
Posté par Gil Cot ✔ (site web personnel, Mastodon) . En réponse au journal Challenge: Écrire la plus petite implémentation de /bin/true. Évalué à 3. Dernière modification le 07 avril 2022 à 22:50.
Oui, un coup de
straceou degdbsur le fichier montre qu'il n'est pas exécuté...Et pour l'interpréteur de commande, POSIX dit « If the execve() function fails due to an error equivalent to the [ENOEXEC] error defined in the System Interfaces volume of IEEE Std 1003.1-2001, the shell shall execute a command equivalent to having a shell invoked with the pathname resulting from the search as its first operand, with any remaining arguments passed to the new shell, except that the value of "0ドル" in the new shell may be set to the command name. If the executable file is not a text file, the shell may bypass this command execution. In this case, it shall write an error message, and shall return an exit status of 126. »
"It is seldom that liberty of any kind is lost all at once." ― David Hume