[Raspbian-devel] Query on behaviour of open-streams upon process-termination

Ajay Garg ajaygargnsit at gmail.com
Fri Jul 29 01:12:34 UTC 2016


Yep Jeff, I understand the stack-overflow link :)

I was wanting to know the behaviour of Raspbian-kernel; whether or not it
automatically closes any opened streams on exit (like glibc does).

On 29 Jul 2016 1:57 a.m., "Jeff Loughlin" <loughlinjd at gmail.com> wrote:

The answers to that Stack Overflow question seem pretty clear to me. What
exactly do you need clarified?  It's not the OS but the C RTL, and the
standard doesn't specify. To me, that means you better flush and close your
streams before you call exit(), or your program is likely to break.

On Jul 28, 2016, at 1:20 PM, Ajay Garg <ajaygargnsit at gmail.com> wrote:

Hi All.

I have been doing some testing on the Raspbian on Pi-2, and I spuriously
run into some vague issues.

Firstly, I admit that I do call "exit()" at some points of my program,
without closing the open file-streams (instead relying on the OS to do it).

In this pursuit, I was investigating, and
http://stackoverflow.com/questions/7281255/why-is-data-not-being-flushed-to-file-on-process-exit
suggests that closing-of-open-file-streams-upon-process-exit is
OS-dependent.

So, will be grateful if someone could enlighten me in this context as far
as Raspbian is concerned?


Thanks and Regards,
Ajay

_______________________________________________
Raspbian-devel mailing list
Raspbian-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/raspbian-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/raspbian-devel/attachments/20160729/04f26c78/attachment.html>


More information about the Raspbian-devel mailing list