lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 Jan 2015 16:55:42 +0100
From:	Michal Marek <mmarek@...e.cz>
To:	Sylvain BERTRAND <sylvain.bertrand@...il.com>,
	linux-kbuild@...r.kernel.org
CC:	linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: Re: [PATCH] scripts: fix link-vmlinux.sh bash-ism

On 2014-12-29 17:34, Sylvain BERTRAND wrote:
> Chocked while compiling linux with dash shell instead of bash shell.
> See:
> http://pubs.opengroup.org/onlinepubs/000095399/utilities/trap.html

Please describe the actual problem in the changelog. I guess it's
because of the 'ERR' trap?


> Cc: Ingo Molnar <mingo@...nel.org>
> Signed-off-by: Sylvain BERTRAND <sylvain.bertrand@...il.com>
> ---
> --- a/scripts/link-vmlinux.sh	2014-12-29 15:10:29.436431249 +0000
> +++ b/scripts/link-vmlinux.sh	2014-12-29 16:23:06.010853608 +0000
> @@ -111,7 +111,6 @@
>  }
>  
>  # Delete output files in case of error
> -trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM ERR
>  cleanup()
>  {
>  	rm -f .old_version
> @@ -124,6 +123,20 @@
>  	rm -f vmlinux.o
>  }
>  
> +on_exit()
> +{
> +	if [ $? -ne 0 ]; then
> +		cleanup
> +	fi
> +}
> +trap on_exit EXIT
> +
> +on_signals()
> +{
> +	exit 1
> +}
> +trap on_signals HUP INT QUIT TERM

Why not use 'cleanup' directly as a handler?

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ