Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
a5343e76
Commit
a5343e76
authored
Jun 18, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put set_nonblocking() code back in.
parent
704f908e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
util.c
util.c
+24
-6
No files found.
util.c
View file @
a5343e76
...
@@ -24,15 +24,33 @@
...
@@ -24,15 +24,33 @@
*/
*/
#include "rsync.h"
#include "rsync.h"
int
num_waiting
(
int
fd
)
/****************************************************************************
Set a fd into nonblocking mode. Uses POSIX O_NONBLOCK if available,
else
if SYSV use O_NDELAY
if BSD use FNDELAY
****************************************************************************/
int
set_nonblocking
(
int
fd
)
{
{
int
len
=
0
;
int
val
;
ioctl
(
fd
,
FIONREAD
,
&
len
);
#ifdef O_NONBLOCK
return
(
len
);
#define FLAG_TO_SET O_NONBLOCK
#else
#ifdef SYSV
#define FLAG_TO_SET O_NDELAY
#else
/* BSD */
#define FLAG_TO_SET FNDELAY
#endif
#endif
if
((
val
=
fcntl
(
fd
,
F_GETFL
,
0
))
==
-
1
)
return
-
1
;
val
|=
FLAG_TO_SET
;
return
fcntl
(
fd
,
F_SETFL
,
val
);
#undef FLAG_TO_SET
}
}
/* this is taken from CVS */
/* this is taken from CVS */
int
piped_child
(
char
**
command
,
int
*
f_in
,
int
*
f_out
)
int
piped_child
(
char
**
command
,
int
*
f_in
,
int
*
f_out
)
{
{
...
@@ -206,7 +224,7 @@ int create_directory_path(char *fname)
...
@@ -206,7 +224,7 @@ int create_directory_path(char *fname)
derived from GNU C's cccp.c.
derived from GNU C's cccp.c.
*/
*/
int
full_write
(
int
desc
,
char
*
ptr
,
int
len
)
static
int
full_write
(
int
desc
,
char
*
ptr
,
int
len
)
{
{
int
total_written
;
int
total_written
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment