search for: pclose

Displaying 20 results from an estimated 118 matches for "pclose".

Did you mean: close
2015 Sep 15
1
[PATCH] daemon: initrd: print return value from failing process
If either zcat or cpio fails when spawned in initrd-list, pclose will return the actual return value of it, but reply_with_perror still uses errno regardless; thus, the reported error is: libguestfs: error: initrd_list: pclose: Success which is not much helpful. Instead, when pclose returns > 0, extract the actual return value of the subprocess, and prin...
2016 Mar 29
0
[PATCH 1/2] rename icat API to download_inode
...) * this there is no opportunity in the protocol to send any error * message back. Instead we can only cancel the transfer. */ - reply (NULL, NULL); + reply(NULL, NULL); + + while ((r = fread(buffer, 1, sizeof buffer, fp)) > 0) + if (send_file_write(buffer, r) < 0) { + pclose(fp); - while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { - if (send_file_write (buffer, r) < 0) { - pclose (fp); return -1; } - } - if (ferror (fp)) { - fprintf (stderr, "fread: %m"); - send_file_end (1); /* Cancel. */ - pclose (fp); + if (...
2016 Feb 21
2
[PATCH] added ntfscat_i api
...le contents. After + * this there is no opportunity in the protocol to send any error + * message back. Instead we can only cancel the transfer. + */ + reply (NULL, NULL); + + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { + if (send_file_write (buffer, r) < 0) { + pclose (fp); + return -1; + } + } + + if (ferror (fp)) { + fprintf (stderr, "fread: %ld: %m\n", inode); + send_file_end (1); /* Cancel. */ + pclose (fp); + return -1; + } + + if (pclose (fp) != 0) { + fprintf (stderr, "pclose: %ld: %m\n", inode); + send_f...
2006 Oct 02
1
Omindex.cc BSD bug
...mporarily unavailable) making the system unusable and probably skipping documents. I'm using MAC Osx Server 10.4.3 (Darwin/BSD) and GCC 4.0. The problem: On function stdout_to_string a popen is called, but is not closed properly (according the popen manual) because is using fclose instead of pclose and hence processes created by popen are not killed. Solution: Omindex.cc line 201, replace fclose by pclose : If (pclose(sh) == -1) throw read ReadError(); This must correct the problem, I'm not sure if will cause the same error in other platforms or UNIX. Cheers
2005 Nov 23
8
a question about popen() performance on domU
Dear all, When I compared the performance of some application on both a Xen domU and a standard linux machine (where domU runs on a similar physical mahine), I notice the application runs faster on the domU than on the physical machine. Instrumenting the application code shows the application spends more time on popen() calls on domU than on the physical machine. I wonder if xenlinux does some
2016 Mar 29
2
[PATCH] renamed daemon/tsk.c to daemon/sleuthkit.c
...le contents. After + * this there is no opportunity in the protocol to send any error + * message back. Instead we can only cancel the transfer. + */ + reply (NULL, NULL); + + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { + if (send_file_write (buffer, r) < 0) { + pclose (fp); + return -1; + } + } + + if (ferror (fp)) { + fprintf (stderr, "fread: %m"); + send_file_end (1); /* Cancel. */ + pclose (fp); + return -1; + } + + if (pclose (fp) != 0) { + fprintf (stderr, "pclose: %m"); + send_file_end (1); /* Cancel. */...
2016 Feb 22
2
Re: [PATCH] added ntfscat_i api
...rotocol to send any error >> + * message back. Instead we can only cancel the transfer. >> + */ >> + reply (NULL, NULL); >> + >> + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { >> + if (send_file_write (buffer, r) < 0) { >> + pclose (fp); >> + return -1; >> + } >> + } >> + >> + if (ferror (fp)) { >> + fprintf (stderr, "fread: %ld: %m\n", inode); >> + send_file_end (1); /* Cancel. */ >> + pclose (fp); >> + return -1; >> + } >> +...
2016 Mar 29
3
[PATCH 0/2] rename icat API as download_inode
"icat" name comes from the employed command line tool which might be replaced later on with a different implementation. The command name is a bit confusing because it's similar to "cat" but act as "donwload". Therefore I am renaming it with a more clear name. At the same time I cleaned up a bit the code and improved it's readability and code comments. This
2016 Mar 02
0
[PATCH] daemon: ntfs: fix format strings
...1; } @@ -311,14 +311,14 @@ do_ntfscat_i (const mountable_t *mountable, int64_t inode) } if (ferror (fp)) { - fprintf (stderr, "fread: %ld: %m\n", inode); + fprintf (stderr, "fread: %" PRIi64 ": %m\n", inode); send_file_end (1); /* Cancel. */ pclose (fp); return -1; } if (pclose (fp) != 0) { - fprintf (stderr, "pclose: %ld: %m\n", inode); + fprintf (stderr, "pclose: %" PRIi64 ": %m\n", inode); send_file_end (1); /* Cancel. */ return -1; } -- 2.5.0
2016 Feb 22
0
Re: [PATCH] added ntfscat_i api
...e is no opportunity in the protocol to send any error > + * message back. Instead we can only cancel the transfer. > + */ > + reply (NULL, NULL); > + > + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { > + if (send_file_write (buffer, r) < 0) { > + pclose (fp); > + return -1; > + } > + } > + > + if (ferror (fp)) { > + fprintf (stderr, "fread: %ld: %m\n", inode); > + send_file_end (1); /* Cancel. */ > + pclose (fp); > + return -1; > + } > + > + if (pclose (fp) != 0) { > + fp...
2016 Mar 07
0
[PATCH 2/3] added icat API to retrieve deleted or inaccessible files
...le contents. After + * this there is no opportunity in the protocol to send any error + * message back. Instead we can only cancel the transfer. + */ + reply (NULL, NULL); + + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { + if (send_file_write (buffer, r) < 0) { + pclose (fp); + return -1; + } + } + + if (ferror (fp)) { + fprintf (stderr, "fread: %m"); + send_file_end (1); /* Cancel. */ + pclose (fp); + return -1; + } + + if (pclose (fp) != 0) { + fprintf (stderr, "pclose: %m"); + send_file_end (1); /* Cancel. */...
2016 Feb 22
0
Re: [PATCH] added ntfscat_i api
...t; >>+ * message back. Instead we can only cancel the transfer. > >>+ */ > >>+ reply (NULL, NULL); > >>+ > >>+ while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { > >>+ if (send_file_write (buffer, r) < 0) { > >>+ pclose (fp); > >>+ return -1; > >>+ } > >>+ } > >>+ > >>+ if (ferror (fp)) { > >>+ fprintf (stderr, "fread: %ld: %m\n", inode); > >>+ send_file_end (1); /* Cancel. */ > >>+ pclose (fp); > >>+...
2016 Mar 06
0
[PATCH 1/2] added icat and fls0 APIs
...le contents. After + * this there is no opportunity in the protocol to send any error + * message back. Instead we can only cancel the transfer. + */ + reply (NULL, NULL); + + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { + if (send_file_write (buffer, r) < 0) { + pclose (fp); + return -1; + } + } + + if (ferror (fp)) { + fprintf (stderr, "fread: %m"); + send_file_end (1); /* Cancel. */ + pclose (fp); + return -1; + } + + if (pclose (fp) != 0) { + fprintf (stderr, "pclose: %m"); + send_file_end (1); /* Cancel. */...
2014 Jul 29
4
[PATCH 0/2] supermin: improve handling of memory
Hi, the two patches improve the way memory is handled in supermin, by cleanly exiting on memory allocation failures, and free'ing memory when not needed (to keep working and not run out of memory). Pino Toscano (2): Check for failures in memory allocations Free memory buffers when not used src/ext2fs-c.c | 13 +++++++++++-- src/init.c | 13 +++++++++++++ 2 files changed, 24
2007 Apr 19
9
ZFS disables nfs/server on a host
...is is the error from the SMF logs: [ Apr 16 08:41:22 Executing start method ("/lib/svc/method/nfs-server start") ] [ Apr 16 08:41:24 Method "start" exited with status 0 ] [ Apr 18 10:59:23 Executing start method ("/lib/svc/method/nfs-server start") ] Assertion failed: pclose(fp) == 0, file ../common/libzfs_mount.c, line 380, function zfs_share If I re-enable nfs/server after the system is up it''s fine. The system was recently upgraded to use zfs and this has happened on the last two reboots. We have lots of other systems that share nfs through zfs fine and...
2016 Mar 30
4
[PATCH 0/3] rename icat API into download_inode
The command name is a bit confusing because it's similar to "cat" but act as "donwload". Therefore I am renaming it with a more clear name. At the same go I cleaned up a bit the code following the standards and improved the API documentation. This patch is ready for review. Code available at: https://github.com/noxdafox/libguestfs/tree/download_inode Matteo Cafasso (3):
2016 Feb 29
2
[PATCH 1/2] added ntfscat_i api
...le contents. After + * this there is no opportunity in the protocol to send any error + * message back. Instead we can only cancel the transfer. + */ + reply (NULL, NULL); + + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { + if (send_file_write (buffer, r) < 0) { + pclose (fp); + return -1; + } + } + + if (ferror (fp)) { + fprintf (stderr, "fread: %ld: %m\n", inode); + send_file_end (1); /* Cancel. */ + pclose (fp); + return -1; + } + + if (pclose (fp) != 0) { + fprintf (stderr, "pclose: %ld: %m\n", inode); + send_f...
2016 Feb 22
2
Re: [PATCH] added ntfscat_i api
...back. Instead we can only cancel the transfer. >>>> + */ >>>> + reply (NULL, NULL); >>>> + >>>> + while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) { >>>> + if (send_file_write (buffer, r) < 0) { >>>> + pclose (fp); >>>> + return -1; >>>> + } >>>> + } >>>> + >>>> + if (ferror (fp)) { >>>> + fprintf (stderr, "fread: %ld: %m\n", inode); >>>> + send_file_end (1); /* Cancel. */ >>>> +...
2006 Aug 04
11
Assertion raised during zfs share?
...5K /export/home # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT SYS 195M 90K 195M 0% ONLINE - export 74G 114K 74.0G 0% ONLINE - # zfs set sharenfs=on export # zfs share export Assertion failed: pclose(fp) == 0, file ../common/libzfs_mount.c, line 399, function zfs_share Abort - core dumped
2016 Mar 07
4
[PATCH 0/3] added The Sleuth Kit and icat API for downloading inaccessible files
The Sleuth Kit is a filesystem forensic tool for accessing disk volumes and extracting digital evidence from. http://www.sleuthkit.org/ The icat API allows to download a file from a device given its metadata number (inode). It supports multiple filesystem types. The icat command allows to access to otherwise unreachable files such as filesystem data structures and deleted files which content is