search for: lock_nb

Displaying 12 results from an estimated 12 matches for "lock_nb".

Did you mean: block_nb
2010 Nov 25
4
[PATCH]improve suspend_evtchn lock processing
While doing migration, sometimes found suspend lock file was not unlinked in previous operations, then there is an obsolete lock file in place, which causes the current and later migration cannot get lock. That happens seldomly but do happen. After checking the source code, I found there are some places that potentially cause lock file unlinked, including: 1) in lock_suspend_event() function,
2008 Dec 10
0
No subject
...tocol UPS driver $ Revision: 0.5 $ (2.2.2) writing error # cat /etc/nut/ups.conf [PRPC650] driver = powercom port = /dev/ttyUSB0 desc = "Test" Trying with strace shows the following: 12369 open("/dev/ttyUSB0", O_RDWR|O_EXCL|O_NOCTTY|O_NONBLOCK) = 4 12369 flock(4, LOCK_EX|LOCK_NB) = 0 12369 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B1200 -opost -isig -icanon -echo ...}) = 0 12369 ioctl(4, TCFLSH, 0) = 0 12369 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B1200 -opost -isig -icanon -echo ...}) = 0 12369 ioctl(4, SNDCTL_TMR_START or TCSETS, {B1200 -opost -isig...
2011 Jun 28
0
[nut-commits] svn commit r3081 - branches/apcsmart-dev/drivers
...rg>: > @@ -251,14 +251,14 @@ > if (do_lock_port) { > errno = 0; > ret = 0; > -#ifdef HAVE_UU_LOCK > + #ifdef HAVE_UU_LOCK > ret = uu_lock(xbasename(device_path)); > -#elif defined(HAVE_FLOCK) > + #elif defined(HAVE_FLOCK) > ret = flock(fd, LOCK_EX | LOCK_NB); > -#elif defined(HAVE_LOCKF) > + #elif defined(HAVE_LOCKF) > lseek(fd, 0L, SEEK_SET); > ret = lockf(fd, F_TLOCK, 0L); > -#endif > + #endif > if (ret < 0) > upslog_with_errno(LOG_ERR, "apc_ser_try: couldn't lock the port > (%s)", device_...
2007 Jan 22
0
checking a locked file
...} f = open(argv[1], O_RDONLY); the_lock.l_type = F_WRLCK; the_lock.l_whence = SEEK_SET; the_lock.l_start = 0; the_lock.l_len = 0; if(f <= 0) { fprintf(stderr, "Cannot open file: %s\n", argv[1]); return 1; } fcntl(f, F_GETLK, &the_lock); retlck = flock(f, LOCK_EX | LOCK_NB); smblck = fcntl(f, F_GETLEASE, 0); fprintf(stdout, "smblck: %x\n", smblck); close(f); if((the_lock.l_type == F_UNLCK) && (retlck == 0)) { fprintf(stdout, "File is not locked\n"); } else { fprintf(stdout, "File is locked\n"); return 1; } return 0; }
2004 Jul 19
2
locks cooperating with a server side process
...n the lock but the process is still writing to the file. Python code: import fcntl # open file in rw so I gain exclusive lock f = open("cygwin.tar","r+") # if this doesn't raise an IOError, the lock is acquired fcntl.lockf(f,fcntl.LOCK_EX|fcntl.LOCK_NB) which maps into a fcntl exclusive lock with 0 as the start, end, and whence arguments in the flock structure. In smb.conf, "locking = yes" had no effect on my process. The next thing I tried was "strict locking = yes". This had the effect that as soon as my code performs th...
2018 Aug 10
10
Call for testing: OpenSSH 7.8
Hi, OpenSSH 7.8p1 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This is a bugfix release. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH is also available via git using the instructions at
2005 Dec 14
2
Panic: file mail-index-sync-ext.c: line 155 (get_ext_header): assertion failed
One of the mbox files on my server causes dovecot to assert. I've caught the assert in gdb and have attached the backtrace. Unfortunatly my binary isn't built with debugging symbols, so I'm not sure how helpful it will be. smtp:/var$ uname -a Linux smtp 2.6.14-2-686-smp #1 SMP Sat Nov 26 13:37:07 UTC 2005 i686 GNU/Linux smtp:/var$ cat /etc/debian_version 3.1 smtp:/var$ dpkg -p
2018 Oct 11
13
Call for testing: OpenSSH 7.9
Hi, OpenSSH 7.9p1 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This is a bugfix release. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH is also available via git using the instructions at
2007 Nov 05
7
[PATCH] Recover from corrupt tdb on reboot
....path import sys @@ -76,6 +78,23 @@ def check_user(): raise CheckError("invalid user") def start_xenstored(): + pidfname = "/var/run/xenstore.pid" + try: + f = open(pidfname, "a") + try: + fcntl.lockf(f, fcntl.LOCK_EX | fcntl.LOCK_NB) + rootdir = os.getenv("XENSTORED_ROOTDIR") or "/var/lib/xenstored" + for i in glob.glob(rootdir + "/tdb*"): + try: + os.unlink(i) + except: + pass + os.unlink(pidfname...
2006 Jun 26
2
[klibc 28/43] mips support for klibc
...10 +#define F_GETSIG 11 + +#define F_GETLK64 33 +#define F_SETLK64 34 +#define F_SETLKW64 35 + +#define FD_CLOEXEC 1 + +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +#define F_EXLCK 4 +#define F_SHLCK 8 + +#define F_INPROGRESS 16 + +#define LOCK_SH 1 +#define LOCK_EX 2 +#define LOCK_NB 4 +#define LOCK_UN 8 + +#define LOCK_MAND 32 +#define LOCK_READ 64 +#define LOCK_WRITE 128 +#define LOCK_RW 192 + +typedef struct flock { + short l_type; + short l_whence; + loff_t l_start; + loff_t l_len; + pid_t l_pid; +} flock_t; + +#define F_LINUX_SPECIFIC_BASE 1024 + +#endif /* _KLIBC_AR...
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools. Change log v1->v2: - commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem scrub ..." - ability to scrub a single device instead of a whole file system - superfluous command line options removed - resume is now a separate command ("scrub resume") instead of "scrub start -r" -
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at: