[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Findutils-patches] [PATCH] Fix file descriptor leaks.
From: |
Eric Blake |
Subject: |
Re: [Findutils-patches] [PATCH] Fix file descriptor leaks. |
Date: |
Mon, 29 Mar 2010 16:15:53 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3 |
On 03/29/2010 04:01 PM, Eric Blake wrote:
>> * gnulib-local/lib/save-cwd.c.diff: Patch gnulib to set FD_CLOEXEC
>> on the file descriptors opened by save_cwd.
>
> Or you could just update to today's gnulib, where your upstream patch
> doing the same thing was accepted.
>
> I tried testing with your patch, but got this at the very start:
>
> Applying: Fix file descriptor leaks.
> /home/eblake/findutils/.git/rebase-apply/patch:318: new blank line at EOF.
> +
> /home/eblake/findutils/.git/rebase-apply/patch:345: new blank line at EOF.
> +
> /home/eblake/findutils/.git/rebase-apply/patch:426: new blank line at EOF.
> +
> /home/eblake/findutils/.git/rebase-apply/patch:778: new blank line at EOF.
> +
> warning: 4 lines add whitespace errors.
Next, I had to add the following diff (git-merge-changelog is on my
path, but not in the current directory, so [[ -x git-merge-changelog ]]
fails):
diff --git i/import-gnulib.sh w/import-gnulib.sh
index 1786a75..499b0fa 100755
--- i/import-gnulib.sh
+++ w/import-gnulib.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
# import-gnulib.sh -- imports a copy of gnulib into findutils
-# Copyright (C) 2003,2004,2005,2006,2007,2009 Free Software Foundation,
Inc.
+# Copyright (C) 2003,2004,2005,2006,2007,2009,2010 Free Software
Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -279,7 +279,7 @@ Example:
driver="$(git config --get merge.merge-changelog.driver |
sed -e 's/[ ].*//')"
if [[ $? -eq 0 ]]; then
- if ! [[ -x "$driver" ]]; then
+ if ! [[ $("$driver" --help) ]]; then
echo "ERROR: Merge driver $driver is not executable." >&2
echo "ERROR: Please fix $config_file or install $driver" >&2
# Always fatal - if configured, the merge driver should work.
By the way, [[ ]] is a bash-ism, but import-gnulib.sh claims to run with
#!/bin/sh, which is doomed to failure. (I really should dust off my
pending patch that helps rewrite import-gnulib.sh to use gnulib
submodules, to make bootstrapping less painful).
Even with workarounds for import-gnulib.sh in place, I get this while
trying to bootstrap:
patch: **** malformed patch at line 5: --- 9,8 ----
gnulib-git/gnulib/gnulib-tool: *** patch file
gnulib-local/modules/save-cwd.diff didn't apply cleanly
gnulib-git/gnulib/gnulib-tool: *** Stop.
patch: **** malformed patch at line 5: --- 9,8 ----
gnulib-git/gnulib/gnulib-tool: *** patch file
gnulib-local/modules/save-cwd.diff didn't apply cleanly
gnulib-git/gnulib/gnulib-tool: *** Stop.
patch: **** malformed patch at line 5: --- 9,8 ----
gnulib-git/gnulib/gnulib-tool: *** patch file
gnulib-local/modules/save-cwd.diff didn't apply cleanly
gnulib-git/gnulib/gnulib-tool: *** Stop.
+ set +x
gnulib-git/gnulib/gnulib-tool failed, exiting.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature