Am 20.07.2014 02:29, schrieb Karsten Blees:
unix-socket.c: This looks pretty broken. The cd / cd back logic is only
ever used if the socket path is too long. In this case, after cd'ing to
the parent directory of the socket, unix_stream_listen tries to unlink
the *original* socket path, instead
Am 20.07.2014 01:55, schrieb Karsten Blees:
Am 18.07.2014 13:32, schrieb René Scharfe:
Am 18.07.2014 01:03, schrieb Karsten Blees:
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to
On Sun, Jul 20, 2014 at 10:00:41AM +0200, René Scharfe wrote:
-- 8 --
Subject: [PATCH] unix-socket: remove stale socket before calling chdir()
unix_stream_listen() is given a path. It calls unix_sockaddr_init(),
which in turn can call chdir(). After that a relative path doesn't
mean the
On Fri, Jul 18, 2014 at 10:08 PM, René Scharfe l@web.de wrote:
We could wrap this get cwd, cd back pattern as well. So save_cwd
returns an opaque pointer, go_back takes the pointer, (f)chdir back
and free the pointer if needed. On platforms that support fchdir, it
can be used, else we fall
Am 18.07.2014 13:32, schrieb René Scharfe:
Am 18.07.2014 01:03, schrieb Karsten Blees:
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to save the
name of a working directory for the
Am 18.07.2014 12:49, schrieb Duy Nguyen:
can be used, else we fall back to chdir. I think there are only four
places that follow this pattern, here, setup.c (.git discovery), git.c
(restore_env) and unix-socket.c. Enough call sites to make it worth
the effort?
real_path(): here we actually
On Fri, Jul 18, 2014 at 6:03 AM, Karsten Blees karsten.bl...@gmail.com wrote:
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to save the
name of a working directory for the purpose of
Am 18.07.2014 01:03, schrieb Karsten Blees:
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to save the
name of a working directory for the purpose of returning to it. A much
faster and
Am 18.07.2014 12:49, schrieb Duy Nguyen:
On Fri, Jul 18, 2014 at 6:03 AM, Karsten Blees karsten.bl...@gmail.com
wrote:
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to save the
Karsten Blees karsten.bl...@gmail.com writes:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
e.g. git init. Make it static too to reduce stack usage.
But wouldn't this increase overall memory usage? Stack memory
will be reused by subsequent code, while static memory cannot
be reused
This array 'cwd' is used to store the result from getcwd() and chdir()
back. PATH_MAX is the right constant for the job. On systems with
longer PATH_MAX (eg. 4096 on Linux), hard coding 1024 fails stuff,
e.g. git init. Make it static too to reduce stack usage.
Signed-off-by: Nguyễn Thái Ngọc Duy
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
This array 'cwd' is used to store the result from getcwd() and chdir()
back. PATH_MAX is the right constant for the job.
PATH_MAX may be better than 1024, but there can't really be a correct
constant. The actual limit depends on the file
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes:
This array 'cwd' is used to store the result from getcwd() and chdir()
back. PATH_MAX is the right constant for the job. On systems with
longer PATH_MAX (eg. 4096 on Linux), hard coding 1024 fails stuff,
e.g. git init. Make it static too to
René Scharfe l@web.de writes:
These routines have traditionally been used by programs to save the
name of a working directory for the purpose of returning to it. A much
faster and less error-prone method of accomplishing this is to open the
current directory (.) and use the fchdir(2)
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
e.g. git init. Make it static too to reduce stack usage.
But wouldn't this increase overall memory usage? Stack memory
will be reused by subsequent code, while static memory cannot
be reused (but still increases the process working set).
--
To
Am 17.07.2014 20:03, schrieb Junio C Hamano:
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes:
This array 'cwd' is used to store the result from getcwd() and chdir()
back. PATH_MAX is the right constant for the job. On systems with
longer PATH_MAX (eg. 4096 on Linux), hard coding 1024 fails
Am 17.07.2014 19:05, schrieb René Scharfe:
Am 17.07.2014 14:45, schrieb Nguyễn Thái Ngọc Duy:
[...]
These routines have traditionally been used by programs to save the
name of a working directory for the purpose of returning to it. A much
faster and less error-prone method of accomplishing
17 matches
Mail list logo