X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fprogreloc.c;h=19bbc125c43717a923b96863eac4e19a96c6d23c;hb=ffb0b29997c66526985e1f4a496335d0ab4ef111;hp=1e27de72cbe54e837029faacc375acc484c43ee5;hpb=3f322af6c93f7eb4c6ce5ceb789416aae10a50bd;p=gnulib.git diff --git a/lib/progreloc.c b/lib/progreloc.c index 1e27de72c..19bbc125c 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -189,7 +189,7 @@ find_executable (const char *argv0) if (link != NULL && link[0] != '[') return link; if (executable_fd < 0) - executable_fd = open ("/proc/self/exe", O_RDONLY, 0); + executable_fd = open ("/proc/self/exe", O_EXEC, 0); { char buf[6+10+5]; @@ -198,7 +198,7 @@ find_executable (const char *argv0) if (link != NULL && link[0] != '[') return link; if (executable_fd < 0) - executable_fd = open (buf, O_RDONLY, 0); + executable_fd = open (buf, O_EXEC, 0); } } #endif