Changeset 456 for trunk/server/lib/util


Ignore:
Timestamp:
Jun 7, 2010, 9:08:40 AM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: changes from 3.3

Location:
trunk/server/lib/util
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/lib/util/become_daemon.c

    r414 r456  
    6969_PUBLIC_ void become_daemon(bool do_fork, bool no_process_group)
    7070{
     71#ifdef __OS2__
     72// fork daemonize scheme not working in os/2, thus the parent process will currently kill and reap all children when it exits
     73        do_fork = False;
     74#endif
    7175        if (do_fork) {
    7276                if (sys_fork()) {
  • trunk/server/lib/util/blocking.c

    r414 r456  
    5454        if((val = fcntl(fd, F_GETFL, 0)) == -1)
    5555                return -1;
     56#ifndef __OS2__
    5657        if(set) /* Turn blocking on - ie. clear nonblock flag */
    5758                val &= ~FLAG_TO_SET;
     
    5960                val |= FLAG_TO_SET;
    6061        return fcntl( fd, F_SETFL, val);
     62#else
     63        if(set) /* turn blocking on - ie. clear nonblock flag */
     64                val = 0;
     65        else
     66                val = 1;
     67        return os2_ioctl(fd, FIONBIO, (char *) &val, sizeof(val));
     68#endif
     69
    6170#undef FLAG_TO_SET
    6271}
  • trunk/server/lib/util/genrand.c

    r414 r456  
    224224        unsigned char *p;
    225225
     226#ifndef __OS2__
    226227        if(!done_reseed) {
    227228                bytes_since_reseed += len;
     
    242243                done_reseed = true;
    243244        }
     245#endif
    244246
    245247        /*
     
    254256                int copy_len = len > 16 ? 16 : len;
    255257
     258#ifdef __OS2__
     259                os2_randget(md4_buf, sizeof(md4_buf));
     260#else
    256261                get_random_stream(md4_buf, sizeof(md4_buf));
     262#endif
    257263                mdfour(tmp_buf, md4_buf, sizeof(md4_buf));
    258264                memcpy(p, tmp_buf, copy_len);
  • trunk/server/lib/util/util.c

    r414 r456  
    223223        lock.l_pid = 0;
    224224
     225/* @todo eventually insert lock code from 3.3 */
    225226        ret = fcntl(fd,op,&lock);
    226227
Note: See TracChangeset for help on using the changeset viewer.