# ifdef I_PWD
# include <pwd.h>
# else
+# if !defined(VMS)
struct passwd *getpwnam (char *);
struct passwd *getpwuid (Uid_t);
+# endif
# endif
# ifdef HAS_GETPWENT
struct passwd *getpwent (void);
(struct sockaddr *)namebuf, &bufsize);
if (count < 0)
RETPUSHUNDEF;
+#ifdef EPOC
+ /* Bogus return without padding */
+ bufsize = sizeof (struct sockaddr_in);
+#endif
SvCUR_set(bufsv, count);
*SvEND(bufsv) = '\0';
(void)SvPOK_only(bufsv);
count = -1;
}
if (count < 0) {
- if ((IoTYPE(io) == IoTYPE_WRONLY || IoIFP(io) == PerlIO_stdout()
- || IoIFP(io) == PerlIO_stderr()) && ckWARN(WARN_IO))
+ if ((IoTYPE(io) == IoTYPE_WRONLY) && ckWARN(WARN_IO))
{
/* integrate with report_evil_fh()? */
char *name = NULL;
RETPUSHUNDEF;
}
+ if (IoIFP(io))
+ do_close(gv, FALSE);
+
TAINT_PROPER("socket");
fd = PerlSock_socket(domain, type, protocol);
if (fd < 0)
RETPUSHUNDEF;
}
+ if (IoIFP(io1))
+ do_close(gv1, FALSE);
+ if (IoIFP(io2))
+ do_close(gv2, FALSE);
+
TAINT_PROPER("socketpair");
if (PerlSock_socketpair(domain, type, protocol, fd) < 0)
RETPUSHUNDEF;
{
dSP;
#if defined(Direntry_t) && defined(HAS_READDIR)
-#ifndef I_DIRENT
+#if !defined(I_DIRENT) && !defined(VMS)
Direntry_t *readdir (DIR *);
#endif
register Direntry_t *dp;
Pid_t childpid;
int argflags;
+#ifdef PERL_OLD_SIGNALS
childpid = wait4pid(-1, &argflags, 0);
+#else
+ while ((childpid = wait4pid(-1, &argflags, 0)) == -1 && errno == EINTR) {
+ PERL_ASYNC_CHECK();
+ }
+#endif
# if defined(USE_ITHREADS) && defined(PERL_IMPLICIT_SYS)
/* 0 and -1 are both error returns (the former applies to WNOHANG case) */
STATUS_NATIVE_SET((childpid && childpid != -1) ? argflags : -1);
optype = POPi;
childpid = TOPi;
+#ifdef PERL_OLD_SIGNALS
childpid = wait4pid(childpid, &argflags, optype);
+#else
+ while ((childpid = wait4pid(childpid, &argflags, optype)) == -1 && errno == EINTR) {
+ PERL_ASYNC_CHECK();
+ }
+#endif
# if defined(USE_ITHREADS) && defined(PERL_IMPLICIT_SYS)
/* 0 and -1 are both error returns (the former applies to WNOHANG case) */
STATUS_NATIVE_SET((childpid && childpid != -1) ? argflags : -1);