annathyst: (Default)
[personal profile] annathyst
/* version 2.0 of the Morning Routine(tm) */
/* assuming BSD signal semantics, hate SysV */
#include "sleep.h"
#include
[Error: Irreparable invalid markup ('<unistd.h>') in entry. Owner must fix manually. Raw contents below.]

/* version 2.0 of the Morning Routine(tm) */
/* assuming BSD signal semantics, hate SysV */
#include "sleep.h"
#include <unistd.h>
#include <signal.h>
int snooze=0;
jmp_buf env
void sigwake_handler(int sig){
if(!snooze){
alarm(SNOOZE_TIME);
return;
} else {
longjmp(env,1);
}
void alarm_handler(int sig){
snooze=1;
raise(SIGWAKE);
}
int main(void){
int i=setjmp(env);
signal(SIGWAKE,sigwake_handler);
signal(SIGALRM,alarm_handler);
alarm(TIME_SLEEP);
while(!i){
sleep(SLEEP_CYCLE_LENGTH);
}
get_up_nmiaow_damnit();
return(0);
}

heh

Date: 2001-01-01 11:42 pm (UTC)
From: [identity profile] codetoad.livejournal.com
heh..going back to school tomorrow? :)

Re: heh

Date: 2001-01-02 03:33 am (UTC)
From: [identity profile] cookiebus.livejournal.com
No, teferi's just weird.

Profile

annathyst: (Default)
Anna

June 2021

S M T W T F S
  12345
67 89101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 22nd, 2026 02:25 am
Powered by Dreamwidth Studios