public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* B20.1: Setitimer provides virtual timer?
@ 1999-08-11 19:26 chikayama
  1999-08-11 20:45 ` Fergus Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: chikayama @ 1999-08-11 19:26 UTC (permalink / raw)
  To: cygwin; +Cc: chikayama

"setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
signals.  The test program included below, that sets the process timer
and loops awaiting for timer expiration, will loop forever.  However,
running this in background and sending the signal by "kill -VTALRM ..."
from the shell will terminate it as expected (with an exclamation mark 
output).

Is this the spec. of the current release or a bug?

# I really enjoy using Cygwin.  Thank you for your efforts!

-- Takashi Chikayama@Dept. of Frontier Informatics., the Univ. of Tokyo
-- Tel. +81-3-5841-6658; Fax. +81-3-5841-8572
-- E-mail chikayama@klic.org; Home page http://www.logos.t.u-tokyo.ac.jp
\f
#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

volatile int time_has_come;

void handler(int signal)
{
  time_has_come = 1;
  fprintf(stderr, "!\n");
  return;
}

struct itimerval interval;

int main(int argc, char * const argv[])
{
  interval.it_interval.tv_sec = 0;
  interval.it_interval.tv_usec = 0;
  interval.it_value.tv_sec = 1;
  interval.it_value.tv_usec = 0;
  signal(SIGVTALRM, handler);
  (void) setitimer(ITIMER_VIRTUAL, &interval, NULL);
  time_has_come = 0;
  while (1) {
    if (time_has_come) {
      exit(0);
    }
  }
}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: Setitimer provides virtual timer?
  1999-08-11 19:26 B20.1: Setitimer provides virtual timer? chikayama
@ 1999-08-11 20:45 ` Fergus Henderson
  1999-08-31 23:49   ` Fergus Henderson
  1999-08-12 14:26 ` Chris Faylor
  1999-08-31 23:49 ` chikayama
  2 siblings, 1 reply; 6+ messages in thread
From: Fergus Henderson @ 1999-08-11 20:45 UTC (permalink / raw)
  To: chikayama; +Cc: cygwin

On 12-Aug-1999, chikayama@klic.org <chikayama@klic.org> wrote:
> "setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
> signals.  The test program included below, that sets the process timer
> and loops awaiting for timer expiration, will loop forever.  However,
> running this in background and sending the signal by "kill -VTALRM ..."
> from the shell will terminate it as expected (with an exclamation mark 
> output).
> 
> Is this the spec. of the current release or a bug?

The former, I think. 

Last time I checked, only ITIMER_REAL/SIGALRM was supported.
ITIMER_VIRTUAL and ITIMER_PROF were not yet implemented.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: Setitimer provides virtual timer?
  1999-08-11 19:26 B20.1: Setitimer provides virtual timer? chikayama
  1999-08-11 20:45 ` Fergus Henderson
@ 1999-08-12 14:26 ` Chris Faylor
  1999-08-31 23:49   ` Chris Faylor
  1999-08-31 23:49 ` chikayama
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Faylor @ 1999-08-12 14:26 UTC (permalink / raw)
  To: chikayama; +Cc: cygwin

It's not implemented in Cygwin currently.  Actually, I don't know
of any way to implement it, period.

-chris

On Thu, Aug 12, 1999 at 11:28:10AM +0900, chikayama@klic.org wrote:
>"setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
>signals.  The test program included below, that sets the process timer
>and loops awaiting for timer expiration, will loop forever.  However,
>running this in background and sending the signal by "kill -VTALRM ..."
>from the shell will terminate it as expected (with an exclamation mark 
>output).
>
>Is this the spec. of the current release or a bug?
>
># I really enjoy using Cygwin.  Thank you for your efforts!
>
>-- Takashi Chikayama@Dept. of Frontier Informatics., the Univ. of Tokyo
>-- Tel. +81-3-5841-6658; Fax. +81-3-5841-8572
>-- E-mail chikayama@klic.org; Home page http://www.logos.t.u-tokyo.ac.jp
>\f
>#include <sys/time.h>
>#include <unistd.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <signal.h>
>
>volatile int time_has_come;
>
>void handler(int signal)
>{
>  time_has_come = 1;
>  fprintf(stderr, "!\n");
>  return;
>}
>
>struct itimerval interval;
>
>int main(int argc, char * const argv[])
>{
>  interval.it_interval.tv_sec = 0;
>  interval.it_interval.tv_usec = 0;
>  interval.it_value.tv_sec = 1;
>  interval.it_value.tv_usec = 0;
>  signal(SIGVTALRM, handler);
>  (void) setitimer(ITIMER_VIRTUAL, &interval, NULL);
>  time_has_come = 0;
>  while (1) {
>    if (time_has_come) {
>      exit(0);
>    }
>  }
>}
>

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: Setitimer provides virtual timer?
  1999-08-11 20:45 ` Fergus Henderson
@ 1999-08-31 23:49   ` Fergus Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Fergus Henderson @ 1999-08-31 23:49 UTC (permalink / raw)
  To: chikayama; +Cc: cygwin

On 12-Aug-1999, chikayama@klic.org <chikayama@klic.org> wrote:
> "setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
> signals.  The test program included below, that sets the process timer
> and loops awaiting for timer expiration, will loop forever.  However,
> running this in background and sending the signal by "kill -VTALRM ..."
> from the shell will terminate it as expected (with an exclamation mark 
> output).
> 
> Is this the spec. of the current release or a bug?

The former, I think. 

Last time I checked, only ITIMER_REAL/SIGALRM was supported.
ITIMER_VIRTUAL and ITIMER_PROF were not yet implemented.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* B20.1: Setitimer provides virtual timer?
  1999-08-11 19:26 B20.1: Setitimer provides virtual timer? chikayama
  1999-08-11 20:45 ` Fergus Henderson
  1999-08-12 14:26 ` Chris Faylor
@ 1999-08-31 23:49 ` chikayama
  2 siblings, 0 replies; 6+ messages in thread
From: chikayama @ 1999-08-31 23:49 UTC (permalink / raw)
  To: cygwin; +Cc: chikayama

"setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
signals.  The test program included below, that sets the process timer
and loops awaiting for timer expiration, will loop forever.  However,
running this in background and sending the signal by "kill -VTALRM ..."
from the shell will terminate it as expected (with an exclamation mark 
output).

Is this the spec. of the current release or a bug?

# I really enjoy using Cygwin.  Thank you for your efforts!

-- Takashi Chikayama@Dept. of Frontier Informatics., the Univ. of Tokyo
-- Tel. +81-3-5841-6658; Fax. +81-3-5841-8572
-- E-mail chikayama@klic.org; Home page http://www.logos.t.u-tokyo.ac.jp
\f
#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

volatile int time_has_come;

void handler(int signal)
{
  time_has_come = 1;
  fprintf(stderr, "!\n");
  return;
}

struct itimerval interval;

int main(int argc, char * const argv[])
{
  interval.it_interval.tv_sec = 0;
  interval.it_interval.tv_usec = 0;
  interval.it_value.tv_sec = 1;
  interval.it_value.tv_usec = 0;
  signal(SIGVTALRM, handler);
  (void) setitimer(ITIMER_VIRTUAL, &interval, NULL);
  time_has_come = 0;
  while (1) {
    if (time_has_come) {
      exit(0);
    }
  }
}

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: B20.1: Setitimer provides virtual timer?
  1999-08-12 14:26 ` Chris Faylor
@ 1999-08-31 23:49   ` Chris Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Faylor @ 1999-08-31 23:49 UTC (permalink / raw)
  To: chikayama; +Cc: cygwin

It's not implemented in Cygwin currently.  Actually, I don't know
of any way to implement it, period.

-chris

On Thu, Aug 12, 1999 at 11:28:10AM +0900, chikayama@klic.org wrote:
>"setitimer(ITIMER_VIRTUAL, ...)" does not seem to deliver SIGVTALRM
>signals.  The test program included below, that sets the process timer
>and loops awaiting for timer expiration, will loop forever.  However,
>running this in background and sending the signal by "kill -VTALRM ..."
>from the shell will terminate it as expected (with an exclamation mark 
>output).
>
>Is this the spec. of the current release or a bug?
>
># I really enjoy using Cygwin.  Thank you for your efforts!
>
>-- Takashi Chikayama@Dept. of Frontier Informatics., the Univ. of Tokyo
>-- Tel. +81-3-5841-6658; Fax. +81-3-5841-8572
>-- E-mail chikayama@klic.org; Home page http://www.logos.t.u-tokyo.ac.jp
>\f
>#include <sys/time.h>
>#include <unistd.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <signal.h>
>
>volatile int time_has_come;
>
>void handler(int signal)
>{
>  time_has_come = 1;
>  fprintf(stderr, "!\n");
>  return;
>}
>
>struct itimerval interval;
>
>int main(int argc, char * const argv[])
>{
>  interval.it_interval.tv_sec = 0;
>  interval.it_interval.tv_usec = 0;
>  interval.it_value.tv_sec = 1;
>  interval.it_value.tv_usec = 0;
>  signal(SIGVTALRM, handler);
>  (void) setitimer(ITIMER_VIRTUAL, &interval, NULL);
>  time_has_come = 0;
>  while (1) {
>    if (time_has_come) {
>      exit(0);
>    }
>  }
>}
>

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-11 19:26 B20.1: Setitimer provides virtual timer? chikayama
1999-08-11 20:45 ` Fergus Henderson
1999-08-31 23:49   ` Fergus Henderson
1999-08-12 14:26 ` Chris Faylor
1999-08-31 23:49   ` Chris Faylor
1999-08-31 23:49 ` chikayama

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).