(cygheap_fdenum::rewind): Ditto.
* pipe.cc (fhandler_pipe::open): Lock fdtab while enumerating.
* times.cc (utimes_worker): Ditto.
+2005-10-24 Christopher Faylor <cgf@timesys.com>
+
+ * cygheap.h (cygheap_fdenum): Remove start_fd stuff.
+ (cygheap_fdenum::rewind): Ditto.
+ * pipe.cc (fhandler_pipe::open): Lock fdtab while enumerating.
+ * times.cc (utimes_worker): Ditto.
+
2005-10-23 Christopher Faylor <cgf@timesys.com>
* cygheap.h (cygheap_fdenum::cygheap_fdenum): Record locked state or
class cygheap_fdenum : public cygheap_fdmanip
{
- int start_fd;
public:
- cygheap_fdenum (int start_fd = -1, bool lockit = false)
+ cygheap_fdenum (bool lockit = false)
{
locked = lockit;
if (lockit)
cygheap->fdtab.lock ();
- this->start_fd = fd = start_fd < 0 ? -1 : start_fd;
+ fd = -1;
}
int next ()
{
}
void rewind ()
{
- fd = start_fd;
+ fd = -1;
}
};
sscanf (get_name (), "/proc/%d/fd/pipe:[%d]", &pid, (int *) &pipe_hdl);
if (pid == myself->pid)
{
- cygheap_fdenum cfd;
+ cygheap_fdenum cfd (true);
while (cfd.next () >= 0)
{
if (cfd->get_handle () != pipe_hdl)
fhandler_base *fh = NULL;
bool fromfd = false;
- cygheap_fdenum cfd;
+ cygheap_fdenum cfd (true);
while (cfd.next () >= 0)
if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE)
&& strcmp (cfd->get_win32_name (), win32) == 0)