On 01/17/2012 03:57 AM, Jamie Lokier wrote:
> You're right, but it looks like it may be removed in the next edition:
>
>https://www.opengroup.org/austin/docs/austin_446.txt
>
>> it was only pthread_atfork() which was removed.
>
> I didn't think pthread_atfork() ever was async-signal-safe.
>
On Tue, Jan 17, 2012 at 10:18:34AM -0200, Luiz Capitulino wrote:
> On Mon, 16 Jan 2012 21:06:27 +
> "Daniel P. Berrange" wrote:
> > > +has_pmutils = find_executable_file(pmutils_bin, pmutils_path,
> > > + sizeof(pmutils_path));
> > > +
> > > +pid =
On Mon, 16 Jan 2012 16:17:34 -0600
Michael Roth wrote:
> On 01/16/2012 02:09 PM, Luiz Capitulino wrote:
> > The guest-suspend command supports three modes:
> >
> > o hibernate (suspend to disk)
> > o sleep (suspend to ram)
> > o hybrid(save RAM contents to disk, but suspend instead
On Mon, 16 Jan 2012 21:06:27 +
"Daniel P. Berrange" wrote:
> On Mon, Jan 16, 2012 at 06:09:52PM -0200, Luiz Capitulino wrote:
>
> > +/* Try to find executable file 'file'. If it's found, its absolute path is
> > + returned in 'abs_path' and the function returns true. If it's not found,
> >
Michael Roth wrote:
> >STDIO is one of the major areas of code that is definitely not
> >async signal safe. Consider Thread A doing something like
> >fwrite(stderr, "Foo\n"), while another thread forks, and then
> >its child also does an fwrite(stderr, "Foo\n"). Given that
> >every stdio function w
Eric Blake wrote:
> On 01/16/2012 03:51 AM, Jamie Lokier wrote:
> > I'm not sure if it's relevant to the this code, but on Glibc fork() is
> > not async-signal-safe and has been known to crash in signal handlers.
> > This is why fork() was removed from SUS async-signal-safe functions.
>
> fork() i
On 01/16/2012 02:09 PM, Luiz Capitulino wrote:
The guest-suspend command supports three modes:
o hibernate (suspend to disk)
o sleep (suspend to ram)
o hybrid(save RAM contents to disk, but suspend instead of
powering off)
Before trying to suspend, the command queri
On 01/16/2012 02:35 PM, Daniel P. Berrange wrote:
On Mon, Jan 16, 2012 at 02:02:08PM -0600, Michael Roth wrote:
On 01/16/2012 11:23 AM, Luiz Capitulino wrote:
On Mon, 16 Jan 2012 15:18:37 -0200
Luiz Capitulino wrote:
On Mon, 16 Jan 2012 17:13:39 +
"Daniel P. Berrange" wrote:
On Mon,
Eric Blake wrote:
> On 01/13/2012 12:15 PM, Luiz Capitulino wrote:
> > This might look complex, but the final code is quite simple. The
> > purpose of that approach is to allow qemu-ga to reap its children
> > (semi-)automatically from its SIGCHLD handler.
>
> Yes, given your desire for the top-le
On 01/16/2012 01:19 PM, Luiz Capitulino wrote:
>> memset(), strlen, strcpy, and friends in are all in the class
>> of functions that I think are unintentional omissions from the list of
>> async-signal-safe functions (they don't read/modify anything but the
>> pointers passed in, so the _only_ rea
On Mon, Jan 16, 2012 at 06:09:52PM -0200, Luiz Capitulino wrote:
> +/* Try to find executable file 'file'. If it's found, its absolute path is
> + returned in 'abs_path' and the function returns true. If it's not found,
> + the function will return false and 'abs_path' will contain zeros */
>
On Mon, Jan 16, 2012 at 02:02:08PM -0600, Michael Roth wrote:
> On 01/16/2012 11:23 AM, Luiz Capitulino wrote:
> >On Mon, 16 Jan 2012 15:18:37 -0200
> >Luiz Capitulino wrote:
> >
> >>On Mon, 16 Jan 2012 17:13:39 +
> >>"Daniel P. Berrange" wrote:
> >>
> >>>On Mon, Jan 16, 2012 at 03:08:53PM -0
On Mon, 16 Jan 2012 13:08:23 -0700
Eric Blake wrote:
> On 01/16/2012 10:08 AM, Luiz Capitulino wrote:
> >> Strangely enough, POSIX doesn't include strcmp() in its list of
> >> async-signal-safe functions (which is what you should be restricting
> >> yourself to, if qemu-ga is multi-threaded), but
On 01/16/2012 10:08 AM, Luiz Capitulino wrote:
>> Strangely enough, POSIX doesn't include strcmp() in its list of
>> async-signal-safe functions (which is what you should be restricting
>> yourself to, if qemu-ga is multi-threaded), but in practice, I think
>> that is a bug of omission in POSIX, an
On 01/16/2012 11:23 AM, Luiz Capitulino wrote:
On Mon, 16 Jan 2012 15:18:37 -0200
Luiz Capitulino wrote:
On Mon, 16 Jan 2012 17:13:39 +
"Daniel P. Berrange" wrote:
On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote:
On Fri, 13 Jan 2012 14:48:04 -0700
Eric Blake wrote:
+
On Mon, 16 Jan 2012 15:18:37 -0200
Luiz Capitulino wrote:
> On Mon, 16 Jan 2012 17:13:39 +
> "Daniel P. Berrange" wrote:
>
> > On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote:
> > > On Fri, 13 Jan 2012 14:48:04 -0700
> > > Eric Blake wrote:
> > >
> > > > > +
> > > > > +
On Mon, 16 Jan 2012 17:13:39 +
"Daniel P. Berrange" wrote:
> On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote:
> > On Fri, 13 Jan 2012 14:48:04 -0700
> > Eric Blake wrote:
> >
> > > > +
> > > > +pid = fork();
> > > > +if (!pid) {
> > > > +char buf[
On Mon, Jan 16, 2012 at 03:08:53PM -0200, Luiz Capitulino wrote:
> On Fri, 13 Jan 2012 14:48:04 -0700
> Eric Blake wrote:
>
> > > +
> > > +pid = fork();
> > > +if (!pid) {
> > > +char buf[32];
> > > +FILE *sysfile;
> > > +const char *arg;
> > >
On Fri, 13 Jan 2012 14:48:04 -0700
Eric Blake wrote:
> > +
> > +pid = fork();
> > +if (!pid) {
> > +char buf[32];
> > +FILE *sysfile;
> > +const char *arg;
> > +const char *pmutils_bin = "pm-is-supported";
> > +
> > +if (
On 01/16/2012 03:51 AM, Jamie Lokier wrote:
>
> Since you mention async-signal-safety, execlp() isn't
> async-signal-safe! Last time I checked, in Glibc execlp() could call
> malloc(). Also reading PATH looks at the environment, which isn't
> always thread-safe either, depending on what else is
On Fri, 13 Jan 2012 14:48:04 -0700
Eric Blake wrote:
> On 01/13/2012 12:15 PM, Luiz Capitulino wrote:
> > The guest-suspend command supports three modes:
> >
> > o hibernate (suspend to disk)
> > o sleep (suspend to ram)
> > o hybrid(save RAM contents to disk, but suspend instead of
>
On 01/13/2012 12:15 PM, Luiz Capitulino wrote:
> The guest-suspend command supports three modes:
>
> o hibernate (suspend to disk)
> o sleep (suspend to ram)
> o hybrid(save RAM contents to disk, but suspend instead of
> powering off)
>
> To reap terminated children, a ne
On Thu, 5 Jan 2012 12:46:56 +
"Daniel P. Berrange" wrote:
> On Wed, Jan 04, 2012 at 05:45:13PM -0200, Luiz Capitulino wrote:
> > diff --git a/qga/guest-agent-commands.c b/qga/guest-agent-commands.c
> > index a09c8ca..19f29c6 100644
> > --- a/qga/guest-agent-commands.c
> > +++ b/qga/guest-agen
On Wed, Jan 04, 2012 at 05:45:13PM -0200, Luiz Capitulino wrote:
> diff --git a/qga/guest-agent-commands.c b/qga/guest-agent-commands.c
> index a09c8ca..19f29c6 100644
> --- a/qga/guest-agent-commands.c
> +++ b/qga/guest-agent-commands.c
> @@ -574,6 +574,61 @@ int64_t qmp_guest_fsfreeze_thaw(Error
On Wed, 04 Jan 2012 13:03:26 -0700
Eric Blake wrote:
> On 01/04/2012 12:45 PM, Luiz Capitulino wrote:
> > +if (pid == 0) {
> > +/* child */
> > +int fd;
> > +
> > +setsid();
> > +fclose(stdin);
> > +fclose(stdout);
> > +fclose(stderr);
> > +
> >
On 01/04/2012 12:45 PM, Luiz Capitulino wrote:
> +if (pid == 0) {
> +/* child */
> +int fd;
> +
> +setsid();
> +fclose(stdin);
> +fclose(stdout);
> +fclose(stderr);
> +
> +execlp(pmutils_bin, pmutils_bin, NULL);
It's generally a bad idea
On 01/04/2012 01:45 PM, Luiz Capitulino wrote:
For now it only supports the "hibernate" mode, which suspends the
guest to disk.
This command will try to execute the scripts provided by the pm-utils
package. If that fails, it will try to suspend manually by writing
to the "/sys/power/state" file.
27 matches
Mail list logo