Displaying 12 results from an estimated 12 matches for "exec_command".
2004 Aug 06
2
XML statistics on remote server
what i did in this situation was dump the stats/status file to the local
server through a lynx --dump call from php .. and then i also update a
sql table to reflect the changes so i can poll that instead ..
a.
<p>On Thu, 26 Feb 2004, MacSym wrote:
>
> Hi everybody,
>
> I am wondering if it is possible to generate the XML/XSL files on a remote
> server (status.xsl,
2020 Feb 18
2
[PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...v[0] = "du";
- argv[1] = "--apparent-size";
- argv[2] = "-b";
- argv[3] = "-s";
- argv[4] = input;
- argv[5] = NULL;
+ argv[1] = "--block-size=1";
+ argv[2] = "-s";
+ argv[3] = input;
+ argv[4] = NULL;
if (exec_command ((char **) argv, tmpfile) == -1)
return -1;
--
2.24.1
2020 Feb 18
0
Re: [PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...parent-size";
> - argv[2] = "-b";
> - argv[3] = "-s";
> - argv[4] = input;
> - argv[5] = NULL;
> + argv[1] = "--block-size=1";
> + argv[2] = "-s";
> + argv[3] = input;
> + argv[4] = NULL;
>
> if (exec_command ((char **) argv, tmpfile) == -1)
> return -1;
> --
> 2.24.1
>
That didn't help either. And with sparse files even made things worse:
holes are not taken into account now at all.
I repeat my thoughts here again: it is all like "cats and rats game".
We cannot proper...
2014 Jan 27
1
Re: [PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
On Monday 27 January 2014 13:29:54 Richard W.M. Jones wrote:
> +/* Execute a command, sending output to a file. */
> +static int
> +exec_command (char **argv, const char *file, int stderr_to_file)
> +{
> + pid_t pid;
> + int status, fd;
> + FILE *fp;
> + char line[256];
> +
> + pid = fork ();
> + if (pid == -1) {
> + perror ("fork");
> + return -1;
> + }
> + if (pid > 0) {
>...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C.
Two days later ...
The Perl program uses a lot of external commands, which makes
it pretty tedious to implement in C.
Rich.
2020 Feb 18
2
Re: [PATCH] make-fs: Don't use du --apparent-size to estimate input size.
...-b";
> > - argv[3] = "-s";
> > - argv[4] = input;
> > - argv[5] = NULL;
> > + argv[1] = "--block-size=1";
> > + argv[2] = "-s";
> > + argv[3] = input;
> > + argv[4] = NULL;
> >
> > if (exec_command ((char **) argv, tmpfile) == -1)
> > return -1;
> > --
> > 2.24.1
> >
>
> That didn't help either. And with sparse files even made things worse:
> holes are not taken into account now at all.
>
> I repeat my thoughts here again: it is all like &qu...
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...guestfs_feature_available (g, (char **) ntfs_features) == 0) {
+ fprintf (stderr, _("%s: NTFS support was disabled when libguestfs was compiled\n"),
+ program_name);
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Execute a command, sending output to a file. */
+static int
+exec_command (char **argv, const char *file, int stderr_to_file)
+{
+ pid_t pid;
+ int status, fd;
+ FILE *fp;
+ char line[256];
+
+ pid = fork ();
+ if (pid == -1) {
+ perror ("fork");
+ return -1;
+ }
+ if (pid > 0) {
+ if (waitpid (pid, &status, 0) == -1) {
+ perror (&q...
2007 Sep 03
11
MySQL has gone away
Hi,
in a production environment we are running into "MySQL server has gone
away" errors (see below) when we call rebuild_index in aaf. This happens
sporadically.
Any suggestions for what might be wrong or workarounds? I guess we try a
reconnect before we call rebuild_index?
Matthew
ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone
away: SELECT count(*) AS
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi,
this series update libguestfs to a recent gnulib version, so that we
can use its new getprogname module, and solve altogether one of the
porting issues (the need for 'program_name' by the error module of
gnulib), and have a single way to get the name of the current program.
A number of changes in tools mostly, although mechanical.
Thanks,
Pino Toscano (3):
Update gnulib to latest
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...0) {
- fprintf (stderr, _("%s: NTFS support was disabled when libguestfs was compiled\n"),
+ fprintf (stderr,
+ _("%s: NTFS support was disabled when libguestfs was compiled\n"),
guestfs_int_program_name);
return -1;
}
@@ -249,7 +253,8 @@ exec_command (char **argv, const char *file)
return -1;
}
if (!WIFEXITED (status) || WEXITSTATUS (status) != 0) {
- fprintf (stderr, _("%s: %s command failed\n"), guestfs_int_program_name, argv[0]);
+ fprintf (stderr, _("%s: %s command failed\n"),
+ g...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.