Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

What are the safest POSIX functions?

 
   Soft32 Home -> Linux -> App Development RSS
Next:  Mac flirts with 10 per cent web share---Windows o..  
Author Message
Martin Carmody

External


Since: Feb 02, 2009
Posts: 1



(Msg. 1) Posted: Mon Feb 02, 2009 5:20 pm
Post subject: What are the safest POSIX functions?
Archived from groups: comp>os>linux>development>system, others (more info?)

Hi,

What are the safest POSIX.1 functions?
Asked from a different angle, what functions should one be wary of
with POSIX C programming?
What POSIX functions can be easily misused?


"Poetic justice."
Back to top
Login to vote
Ian Collins

External


Since: Jun 15, 2007
Posts: 5



(Msg. 2) Posted: Mon Feb 02, 2009 5:20 pm
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: comp>os>linux>development>system, others (more info?)

Martin Carmody wrote:

Is this a troll? Why the inappropriate follow up?

--
Ian Collins
Back to top
Login to vote
Antoninus Twink

External


Since: Feb 02, 2009
Posts: 1



(Msg. 3) Posted: Mon Feb 02, 2009 5:20 pm
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: comp>lang>c, others (more info?)

On 2 Feb 2009 at 21:41, Ian Collins wrote:
> Is this a troll? Why the inappropriate follow up?

There was no inappropriate followup - that's a projection you've made
based on your own ridiculous prejudices.
Back to top
Login to vote
Måns_Rullgård

External


Since: May 05, 2004
Posts: 84



(Msg. 4) Posted: Mon Feb 02, 2009 5:20 pm
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: comp>os>linux>development>system, others (more info?)

Martin Carmody <poetic.DeleteThis@justice.org> writes:

> Hi,
>
> What are the safest POSIX.1 functions?

_exit()

--
Måns Rullgård
mans.DeleteThis@mansr.com
Back to top
Login to vote
Grant Edwards

External


Since: Jul 03, 2003
Posts: 199



(Msg. 5) Posted: Mon Feb 02, 2009 5:20 pm
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2009-02-02, Martin Carmody <poetic.RemoveThis@justice.org> wrote:

> What are the safest POSIX.1 functions?

exit() and abort()

> Asked from a different angle, what functions should one be
> wary of with POSIX C programming?

All the rest.

> What POSIX functions can be easily misused?

Define "misused".

--
Grant Edwards grante Yow! I guess you guys got
at BIG MUSCLES from doing too
visi.com much STUDYING!
Back to top
Login to vote
Jasen Betts

External


Since: Nov 15, 2008
Posts: 43



(Msg. 6) Posted: Tue Feb 03, 2009 7:20 am
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: comp>os>linux>development>apps (more info?)

On 2009-02-02, Martin Carmody <poetic DeleteThis @justice.org> wrote:
> Hi,
>
> What are the safest POSIX.1 functions?
> Asked from a different angle, what functions should one be wary of
> with POSIX C programming?

safe:
exit
perror
puts

use with care
printf
and most others.

unsafe:
gets


(printf can write memory)
Back to top
Login to vote
Måns_Rullgård

External


Since: May 05, 2004
Posts: 84



(Msg. 7) Posted: Tue Feb 03, 2009 7:20 am
Post subject: Re: What are the safest POSIX functions? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jasen Betts <jasen DeleteThis @xnet.co.nz> writes:

> On 2009-02-02, Martin Carmody <poetic DeleteThis @justice.org> wrote:
>> Hi,
>>
>> What are the safest POSIX.1 functions?
>> Asked from a different angle, what functions should one be wary of
>> with POSIX C programming?
>
> safe:
> exit

exit() calls handlers registered with atexit(). Those could be doing
all manner of unsafe things. _exit(), on the other hand, goes
directly to the exit syscall. Nothing could be safer.

--
Måns Rullgård
mans DeleteThis @mansr.com
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How can i register a link protocol for browsers - I want to add an action to the system so that every time a user clicks in a link with for example ..

storing the data in ln2440 target board memory - hai.. i using the target board ln2440sbc..and linux OS.. (16Mb flash and 32Mb sdram) i have cross compiled and porte...

GTK run error - hi i had created one same application in glad interface designer with c option.the n i compiled the same after that i....

C++ -> mplayer, stdin, stdout, popen / fork / pipe... - Hello everybody. I tried to work this out on my own for about 6 hours non-stop now and I just don't get it working.......

[gentoo-user] gcc upgrade: what's safest option? - Hi, I'm finally on summer break and I can take the time for ye olde GCC 3.3-->3.4 infamous transition. I have a cou...

[Samba] best, safest and easiest way to provide remote acc.. - dear list. this question is rather related to samba, although not exclusively. I consider it related enough to ask..
       Soft32 Home -> Linux -> App Development All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]