Subversion Repositories wimsdev

Rev

Rev 12472 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12472 Rev 15847
Line 168... Line 168...
168
  char *abuf[8];
168
  char *abuf[8];
169
 
169
 
170
  va_start(vp,s);
170
  va_start(vp,s);
171
  vsnprintf(buf,sizeof(buf),s,vp);
171
  vsnprintf(buf,sizeof(buf),s,vp);
172
  va_end(vp);
172
  va_end(vp);
173
  abuf[0]="sh"; abuf[1]="-c"; abuf[2]=buf; abuf[3]=NULL;
173
  abuf[0]="zsh"; abuf[1]="-c"; abuf[2]=buf; abuf[3]=NULL;
174
  exec_wait=wait;
174
  exec_wait=wait;
175
  return execredirected(abuf[0],NULL,NULL,NULL,abuf);
175
  return execredirected(abuf[0],NULL,NULL,NULL,abuf);
176
}
176
}
177
 
177
 
178
void wimslogd_error(char *msg)
178
void wimslogd_error(char *msg)
Line 192... Line 192...
192
  vsnprintf(pp,sizeof(lbuf)-(pp-lbuf),p,vp);
192
  vsnprintf(pp,sizeof(lbuf)-(pp-lbuf),p,vp);
193
  va_end(vp);
193
  va_end(vp);
194
  pp=strchr(lbuf,'\n'); if(pp) *pp=0;
194
  pp=strchr(lbuf,'\n'); if(pp) *pp=0;
195
  strip_trailing_spaces(lbuf); strcat(lbuf,"\n");
195
  strip_trailing_spaces(lbuf); strcat(lbuf,"\n");
196
  wlogdaccessfile(lbuf,"a",debugfile);
196
  wlogdaccessfile(lbuf,"a",debugfile);
-
 
197
}
-
 
198
 
-
 
199
void my_debug(char*s,...)
-
 
200
{
-
 
201
  va_list vp;
-
 
202
  char buf[MAX_LINELEN+1];
-
 
203
 
-
 
204
  va_start(vp,s);
-
 
205
  vsnprintf(buf,sizeof(buf),s,vp);
-
 
206
  va_end(vp);
-
 
207
 
-
 
208
 call_sh(1,"echo -n '%s' >> /tmp/debug",buf);
197
}
209
}