Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ben Boeckel
ParaView
Commits
0f34ebeb
Commit
0f34ebeb
authored
Jul 07, 2004
by
Brad King
Browse files
ERR: Using KWSYSPE_PIPE_BUFFER_SIZE in place of separate bufferSize constant for consistency.
parent
9bbcabc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Utilities/KWSys/ProcessUNIX.c
View file @
0f34ebeb
...
@@ -1738,8 +1738,7 @@ static void kwsysProcessKill(pid_t process_id)
...
@@ -1738,8 +1738,7 @@ static void kwsysProcessKill(pid_t process_id)
#else
#else
char
fname
[
4096
];
char
fname
[
4096
];
#endif
#endif
const
int
bufferSize
=
1024
;
char
buffer
[
KWSYSPE_PIPE_BUFFER_SIZE
+
1
];
char
buffer
[
1025
];
/* should be buffersize +1 but fails to build on hp cc*/
struct
dirent
*
d
;
struct
dirent
*
d
;
/* Each process has a directory in /proc whose name is the pid.
/* Each process has a directory in /proc whose name is the pid.
...
@@ -1762,7 +1761,7 @@ static void kwsysProcessKill(pid_t process_id)
...
@@ -1762,7 +1761,7 @@ static void kwsysProcessKill(pid_t process_id)
FILE
*
f
=
fopen
(
fname
,
"r"
);
FILE
*
f
=
fopen
(
fname
,
"r"
);
if
(
f
)
if
(
f
)
{
{
int
nread
=
fread
(
buffer
,
1
,
bufferSize
,
f
);
int
nread
=
fread
(
buffer
,
1
,
KWSYSPE_PIPE_BUFFER_SIZE
,
f
);
buffer
[
nread
]
=
'\0'
;
buffer
[
nread
]
=
'\0'
;
if
(
nread
>
0
)
if
(
nread
>
0
)
{
{
...
...
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