[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 04/10] Add a script to extract VSS SDK header
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH v4 04/10] Add a script to extract VSS SDK headers on POSIX system |
Date: |
Tue, 25 Jun 2013 10:30:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130513 Thunderbird/17.0.6 |
On 06/06/13 17:06, Tomoki Sekiyama wrote:
> +tmpdir=$(mktemp -d)
> +trap "rm -fr $tmpdir vsssdk.msi; exit 1" HUP INT QUIT ALRM TERM
"mktemp" keys off TMPDIR, so I would prefer something like (note the
single quotes -- $tmpdir is expanded at trap execution time):
trap 'rm -fr -- "$tmpdir"'
but whoever starts TMPDIR with a dash, or puts whitespace in it,
deserves what's coming to him.
Also sigpsec in "trap" could have been EXIT -- then you could have
omitted the final cleanup on the success path. The "exit 1" is not
necessary; AFAIR the trap handler doesn't change the exit status that
the shell has decided for otherwise (IOW exit status of the trap handler
should be suppressed anyway).
Placing an "exit 1" in the trap handler could even be detrimental
somewhat, since it might mess with WIFSIGNALED() / WTERMSIG() that would
otherwise tell a parent shell to interrupt the parent script.
http://www.cons.org/cracauer/sigint.html
I've said nothing substantial. I wish I could go into such detail when
reviewing the real meat of the series...
Reviewed-by: Laszlo Ersek <address@hidden>
- Re: [Qemu-devel] [PATCH v4 06/10] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze, (continued)
[Qemu-devel] [PATCH v4 08/10] qemu-ga: call Windows VSS requester in fsfreeze command handler, Tomoki Sekiyama, 2013/06/06
[Qemu-devel] [PATCH v4 01/10] configure: Support configuring c++ compiler, Tomoki Sekiyama, 2013/06/06
[Qemu-devel] [PATCH v4 04/10] Add a script to extract VSS SDK headers on POSIX system, Tomoki Sekiyama, 2013/06/06
[Qemu-devel] [PATCH v4 10/10] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command, Tomoki Sekiyama, 2013/06/06
[Qemu-devel] [PATCH v4 07/10] qemu-ga: Add Windows VSS requester to quiesce applications and filesystems, Tomoki Sekiyama, 2013/06/06
Re: [Qemu-devel] [PATCH v4 00/10] qemu-ga: fsfreeze on Windows using VSS, Stefan Hajnoczi, 2013/06/10