What is the difference between exit() and _exit() system call?

Should I employ exit(int status) or _exit(int status) to exit() from a child process? Does this question haunt you quite often? If so, this post is for you.

The exit() method which is part of the C library routines calls the kernel system call _exit() internally.

The responsibility of the kernel system call _exit() includes asking the kernel to close any open descriptors, free the memory used by the process and perform terminating process clean-up. Whereas the exit() call takes care of flushing the I/O buffers and perform additional clean-up before invoking _exit() internally.

In simpler words, exit() performs clean-up related to user-mode constructs in the library, and calls user-supplied cleanup functions whereas _exit() performs only the kernel level cleanup for the process.

It’s always advisable to use _exit(int status) in a child because employing exit(int status) can lead to stdio buffers being flushed twice, and temporary files being unexpectedly removed.

Finally, exit(int status) is defined in stdio.h and _exit(int status) is defined in unistd.h file.

Disclaimer

All data and information provided on this site is for informational purposes only. sks8.wordpress.com or skumar.co.nr makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis. Any trademarks, if at all displayed on this blog belong to their respective owners.

Reblog this post [with Zemanta]
Advertisements

I want to be hired. What traits should I cultivate?

What do employers look for in a candidate?” – This is the preponderant thought that harasses every job seeker. Are they behind technical knowledge or experience? What values and soft skills do they prefer? Do they impart prime importance to the personality and the ability to adapt to the organisation culture?

The candidate should be well aware of what would impress the prospective employer if they are willing to pocket their desired job. Having the knowledge of the critical skills that the employers look for is almost half the battle won.

Some of the most common employer requisites when shortlisting a candidate are listed below.

1. Education and Experience

  • A strong educational background is and will always be a top priority of every employer.
  • Relevant work experience plays a very significant role in deciding the candidates eligibility for a job in consideration.
  • The employers always prefer candidates who have specific occupational expertise, well qualified and experienced so that they can hit the ground running without any need for extensive training or direction.
  • In case of fresh graduates, employers may give weightage to credentials, impressive grades, scholarships, awards and recognitions, and sometimes the type of school/college attended.

2. Computer Literacy

3. Communication skills

  • Verbal and written communication skills including listening skills.

4. Teamwork

  • It’s all about collaboration, participation, working harmoniously, avoiding conflicts, interacting and spending time with other team members.

5. Leadership

  • Helping, encouraging, coaching and inspiring coworkers is classified under ‘Leadership’.

6. Initiative

  • The candidate should beĀ  a self-starter and get the work done without constantly being told what needs to be done and reminded of the same.

7. Flexibility

  • The candidate should be able to adapt to changing conditions and work assignments.

8. Result-oriented

  • The candidate should be able to plan, organise and implement anything from tasks and projects to deadlines. Should be good at prioritising along with efficient time management.

9. Analysis

  • Should be able to analyse situations, seek information from appropriate sources and then resourcefully solve the problems. The decision making skill plays a major role in the analysis ability of the candidate.

10. Work ethics

  • The candidate should respect personal values like honesty, integrity, punctuality, reliability, commitment and dedication.

Note

The title and order of the bullet points above were borrowed from an article titled – ‘Top traits to cultivate if you want to be hired’ published in the ‘Career Clues’ column of the ‘The Hindu Newspaper’, written by ‘Payal Chanania’.

Disclaimer

All data and information provided on this site is for informational purposes only. Neither sks8.wordpress.com nor skumar.co.nr makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis. The logos, images and trademarks used on this blog belong to their respective owners.

Reblog this post [with Zemanta]