This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

static fork strerror and how they interact.


Hello, I've been reading the glibc docs and they read that the function strerror warns that when using multiple threads that the static buffer may be overwritten. At the same time I wanted to create a new thread using fork and it says thet the process it spawns _will_ have a complete copy of the parents memory space. I also thought from what I learned that declaring anything as static garentees that the said thing will not be addressable from another process.
My question is this, if I'm correct in my deductions so far am I corretc in believing that the strerror function, after fork is used, _will_ have a _seperate_ static buffer for the newly spawned process, and so the buffer will not be accidentally overwritten?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]