4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pipe (READ,WRITE);
WRITE->autoflush(1);
my $pid = fork();
if ($pid==0) {
close(WRITE);
fcntl(READ, F_SETFL(), O_NONBLOCK);
main("start","");
while (1) {
my $data_read = "";
if (defined(sysread(READ, $data_read,$maxBuffer))) {
chomp($data_read);
print "$data_read";
XMLparse($data_read);
}
}
}
else {
close(READ);
while (1) {
my $data_write = "";
my $nval = $server->recv($data_write, $maxBuffer, 0);
if (defined($nval) && length($data_write)) {
print "$data_write";
print WRITE $data_write,"\n";
}
}
}
close($server);
exit(0);
4 Einträge, 1 Seite |