LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-25-2019, 08:57 PM   #1
mike_canada
LQ Newbie
 
Registered: Jul 2019
Posts: 23

Rep: Reputation: Disabled
Considering safe_read() over read() to read data


In my programs that involve reading data from my own hardware connected to the serial port, I used the read() function.

I tried the unix command cat to read data from my hardware and the data is always correct.

when I look at the source code for the cat command (see http://git.savannah.gnu.org/cgit/cor...lain/src/cat.c), I noticed it uses safe_read() instead of just read().

Is there some package I can install on kernel 2.4 that contains this functionality? so my code can then execute safe_read()?

because when I looked at safe_read.h (through more searching), It states that if an interrupt occurred during a read, safe_read() function will try again with reading. and I don't think a normal read() does this.

Any idea where I can get this package?

Currently I have a full-blown slackware 13 install on my machine and I do not see safe_read() anywhere in the man pages.
 
Old 07-26-2019, 04:22 AM   #2
individual
Member
 
Registered: Jul 2018
Posts: 315
Blog Entries: 1

Rep: Reputation: 232Reputation: 232Reputation: 232
It looks like it's a GNU coreutils "utility function."
safe-read.h
safe-read.c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't forward Xapp data from IRIX server over telnet to RHEL 6.5 server over ssh to CentOS 6.8 desktop ran4keli Linux - Software 1 10-17-2016 08:44 AM
[SOLVED] Considering updating to 11.10 from 10.10, wondering if data will be erased 9sp7ky3 Ubuntu 20 03-21-2012 11:16 AM
New here, considering switching over from Windows. I need advice. plain_oatmeal_sux Linux - Software 14 01-14-2006 01:15 PM
Considering Xorg, Slack favors Xorg over Xfree Nichole_knc Slackware 7 06-13-2004 07:46 AM
compile kernel over, and over, and over....... chopp Slackware 10 03-30-2004 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration