From: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
Cc: Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH] Add O_TRUNC when creating cryo file
Date: Tue, 24 Jun 2008 15:49:57 -0700 [thread overview]
Message-ID: <20080624224957.GA22681@us.ibm.com> (raw)
From 9b4dff531586c8dd0b0c75b17ef9ea3e5efc4d0e Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Tue, 24 Jun 2008 15:42:55 -0700
Subject: [PATCH] Add O_TRUNC when creating cryo file
Signed-off-by: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
cr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cr.c b/cr.c
index 96a2ea0..b688229 100644
--- a/cr.c
+++ b/cr.c
@@ -1966,7 +1966,7 @@ int main(int argc, char **argv)
case 'l': mode = ch; break;
case 's': cr_mode |= CR_STOP; break;
case 'm': cr_mode |= CR_MMAP; break;
- case 'p': mode = ch; fd = 1; perm = O_WRONLY|O_CREAT; pid = (pid_t)atoi(optarg); break;
+ case 'p': mode = ch; fd = 1; perm = O_WRONLY|O_CREAT|O_TRUNC; pid = (pid_t)atoi(optarg); break;
case 'r': mode = ch; break;
case 'f': strncpy(filename, optarg, sizeof(filename)); break;
default: usage(); exit(1);
--
1.5.2.5
next reply other threads:[~2008-06-24 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 22:49 sukadev-r/Jw6+rmf7HQT0dZR+AlfA [this message]
[not found] ` <20080624224957.GA22681-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-06-24 23:03 ` [PATCH] Add O_TRUNC when creating cryo file Serge E. Hallyn
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=20080624224957.GA22681@us.ibm.com \
--to=sukadev-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.