Displaying 2 results from an estimated 2 matches for "errfun".
Did you mean:
errfunc
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...onnection) tq; /* Timeout Queue */
con *fdcon;
-/*
- * This is just a wrapper around fgets() to make it usable.
- */
-
-/* Stress-test. Increase this later. */
-#define LINEBUF_SIZE 16
-
-typedef struct {
- char *buf;
- u_int size;
- int lineno;
- const char *filename;
- FILE *stream;
- void (*errfun) (const char *,...);
-} Linebuf;
-
-static Linebuf *
-Linebuf_alloc(const char *filename, void (*errfun) (const char *,...))
-{
- Linebuf *lb;
-
- if (!(lb = malloc(sizeof(*lb)))) {
- if (errfun)
- (*errfun) ("linebuf (%s): malloc failed\n",
- filename ? filename : "(stdin)&...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...}
+
+ close($self->{stderr});
+
+ delete($self->{pid});
+ delete($self->{stdin});
+ delete($self->{stdout});
+ delete($self->{stderr});
+}
+
+sub DESTROY
+{
+ my $self = shift;
+ $self->close();
+}
+
+sub _check_stderr
+{
+ my $self = shift;
+ my ($rw, $errfun) = @_;
+
for(;;) {
- my ($rin, $rout);
+ my ($rin, $rout, $win, $wout);
$rin = '';
- vec($rin, fileno($stdout_read), 1) = 1;
- vec($rin, fileno($stderr_read), 1) = 1;
+ vec($rin, fileno($self->{stderr}), 1) = 1;
+
+ # Waiting to rea...