vincent-lafouasse / minishell

what if bash didn't exist?
0 stars 0 forks source link

nitpick: calls to `write` may only perform a partial write #61

Open bitquence opened 1 week ago

bitquence commented 1 week ago

as per the manual:

The number of bytes written may be less than count if, for example, there is insufficient space on the underlying physical medium, or the RLIMIT_FSIZE resource limit is encountered (see setrlimit(2)), or the call was interrupted by a signal handler after having written less than count bytes. (See also pipe(7).)

the only place where write is currently used is while writing to standard error; it may be a good idea to write a function that handles this edge case by either erroring out or retrying a fixed amount of times. #38, once merged, should also use write to write a here document to a temporary file, and can be handled individually

vincent-lafouasse commented 1 week ago

ah