2002-11-08 Theodore Ts'o <tytso@mit.edu>
+ * fs_ext2.c (fs_expand, fs_shrink): Synchronize with EVMS CVS rev
+ 1.11 (2002/8/27). Read from the resize2fs output in
+ non-blocking mode, so the GUI continues to updates the window.
+
* fsimext2.h: Synchronize with EVMS CVS rev 1.8 (2002/8/29).
Change all __uXX's to u_intXX_t's.
#include <string.h>
#include <unistd.h>
#include <errno.h>
+#include <fcntl.h>
#include <plugin.h>
#include <sys/wait.h>
#include "fsimext2.h"
close(fds2[1]);
/* wait for child to complete */
+ fcntl(fds2[0], F_SETFL, fcntl(fds2[0], F_GETFL,0) | O_NONBLOCK);
while (!(pidf = waitpid( pidf, &status, WNOHANG ))) {
bytes_read = read(fds2[0],buffer,MAX_USER_MESSAGE_LEN);
if (bytes_read > 0) {
close(fds2[1]);
write(fds1[1], "Yes\n",4);
+ fcntl(fds2[0], F_SETFL, fcntl(fds2[0], F_GETFL,0) | O_NONBLOCK);
/* wait for child to complete */
while (!(pidf = waitpid( pidf, &status, WNOHANG ))) {
bytes_read = read(fds2[0],buffer,MAX_USER_MESSAGE_LEN);