From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: patrick@parcs.ath.cx, gdb-patches@sourceware.org
Subject: Re: [PATCH] Append to input history file instead of overwriting it
Date: Wed, 10 Dec 2014 17:17:00 -0000 [thread overview]
Message-ID: <83a92vv37l.fsf@gnu.org> (raw)
In-Reply-To: <54887AB5.3000101@redhat.com>
> Date: Wed, 10 Dec 2014 16:54:13 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches@sourceware.org
>
> Is it that hard to do though? How about temporarily renaming the
> history file to something that includes gdb's PID (and would not a
> file name a user would use in practice) while we append
> to it, and then (atomically) rename it back? Something like:
>
> #1 - move $HISTFILE -> $HISTFILE-gdb$PID~
> #2 - write/append history to $HISTFILE-gdb$PID~
> #3 - move $HISTFILE-gdb$PID~ -> $HISTFILE
You cannot portably rename a file someone writes to, unless you are
willing to limit this to Posix filesystems.
next prev parent reply other threads:[~2014-12-10 17:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-29 2:01 Patrick Palka
2014-12-01 20:50 ` Sergio Durigan Junior
2014-12-04 16:18 ` Pedro Alves
2014-12-05 0:19 ` Patrick Palka
2014-12-05 10:45 ` Pedro Alves
2014-12-05 14:11 ` Patrick Palka
2014-12-10 16:54 ` Pedro Alves
2014-12-10 17:17 ` Eli Zaretskii [this message]
2014-12-10 17:23 ` Pedro Alves
2015-01-10 14:10 ` Patrick Palka
2015-01-10 15:16 ` Patrick Palka
2015-01-10 15:18 ` Patrick Palka
2015-01-10 15:39 ` Eli Zaretskii
2015-01-10 15:48 ` Patrick Palka
2015-01-10 16:03 ` Eli Zaretskii
2015-01-10 16:18 ` Patrick Palka
2015-01-10 16:41 ` Eli Zaretskii
2015-01-10 18:17 ` Patrick Palka
2015-01-10 18:46 ` Patrick Palka
2015-01-12 19:05 ` Pedro Alves
2015-01-12 22:56 ` Patrick Palka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a92vv37l.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=patrick@parcs.ath.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox