[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 1/4] fs: Implement close-on-fork
> It's not safe to call system() from a threaded app.  That's all.  It's right there in the DESCRIPTION:

That is true, but that description is missing from both the Linux man page and the glibc documentation ( It seems like a minor point that won't be noticed until it causes a problem, and problems are rare enough they might go unnoticed for a while. We have removed system() from our application, but we're also concerned that libraries we integrate will use system() without our knowledge.

-----Original Message-----
From: Matthew Wilcox <>
Sent: Wednesday, April 22, 2020 10:44
To: Karstens, Nate <>
Cc: Alexander Viro <>; Jeff Layton <>; J. Bruce Fields <>; Arnd Bergmann <>; Richard Henderson <>; Ivan Kokshaysky <>; Matt Turner <>; James E.J. Bottomley <>; Helge Deller <>; David S. Miller <>; Jakub Kicinski <>;;;;;;;; David Laight <>; Changli Gao <>
Subject: Re: [PATCH 1/4] fs: Implement close-on-fork

CAUTION - EXTERNAL EMAIL: Do not click any links or open any attachments unless you trust the sender and know the content is safe.

On Wed, Apr 22, 2020 at 03:36:09PM +0000, Karstens, Nate wrote:
> There was some skepticism about whether our practice of
> closing/reopening sockets was advisable. Regardless, it does expose
> what I believe to be something that was overlooked in the forking
> process model. We posted two solutions to the Austin Group defect tracker:

I don't think it was "overlooked" at all. It's not safe to call system() from a threaded app. That's all. It's right there in the DESCRIPTION:

The system() function need not be thread-safe.

> Ultimately the Austin Group felt that close-on-fork was the preferred
> approach. I think it's also worth pointing that out Solaris reportedly
> has this feature
> (

I am perplexed that the Austin Group thought this was a good idea.


CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.

 \ /
  Last update: 2020-04-22 18:04    [W:0.059 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site