GNU bug report logs - #58117
[PATCH] [SV 63111] Set osync handle to noinherit

Previous Next

Package: emacs;

Reported by: Andreas Schwab <schwab <at> suse.de>

Date: Tue, 27 Sep 2022 14:24:02 UTC

Severity: normal

Tags: notabug, patch

Done: Andreas Schwab <schwab <at> suse.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58117 in the body.
You can then email your comments to 58117 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58117; Package emacs. (Tue, 27 Sep 2022 14:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> suse.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 27 Sep 2022 14:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] [SV 63111] Set osync handle to noinherit
Date: Tue, 27 Sep 2022 16:23:04 +0200
* src/posixos.c (osync_setup, osync_parse_mutex): Set osync_handle
to noinherit.
---
 src/posixos.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/posixos.c b/src/posixos.c
index d587f9c8..4097ce15 100644
--- a/src/posixos.c
+++ b/src/posixos.c
@@ -628,7 +628,10 @@ osync_setup ()
 {
   osync_handle = get_tmpfd (&osync_tmpfile);
   if (osync_handle >= 0)
-    sync_parent = 1;
+    {
+      fd_noinherit (osync_handle);
+      sync_parent = 1;
+    }
 }
 
 char *
@@ -662,6 +665,8 @@ osync_parse_mutex (const char *mutex)
     OSS (fatal, NILF, _("cannot open output sync mutex %s: %s"),
          osync_tmpfile, strerror (errno));
 
+  fd_noinherit (osync_handle);
+
   return 1;
 }
 
-- 
2.37.3


-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




Added tag(s) notabug. Request was from Andreas Schwab <schwab <at> suse.de> to control <at> debbugs.gnu.org. (Tue, 27 Sep 2022 14:36:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 58117 <at> debbugs.gnu.org and Andreas Schwab <schwab <at> suse.de> Request was from Andreas Schwab <schwab <at> suse.de> to control <at> debbugs.gnu.org. (Tue, 27 Sep 2022 14:36:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Oct 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.