NetBSD Problem Report #48861

From www@NetBSD.org  Sun Jun  1 18:13:22 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B76B6A5851
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  1 Jun 2014 18:13:22 +0000 (UTC)
Message-Id: <20140601181321.74AF6A6524@mollari.NetBSD.org>
Date: Sun,  1 Jun 2014 18:13:21 +0000 (UTC)
From: msporleder@gmail.com
Reply-To: msporleder@gmail.com
To: gnats-bugs@NetBSD.org
Subject: make flock default like linux (-x)
X-Send-Pr-Version: www-1.0

>Number:         48861
>Category:       bin
>Synopsis:       make flock default like linux (-x)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 01 18:15:00 +0000 2014
>Closed-Date:    Tue Mar 29 02:43:20 +0000 2016
>Last-Modified:  Tue Mar 29 02:43:20 +0000 2016
>Originator:     matt sporleder
>Release:        6.1
>Organization:
netbsd
>Environment:
NetBSD
>Description:
linux flock, which we are attempting to emulate, uses -x as the default.

Our flock defaults (no flags) to an error saying you need to pass a flag.

Using this local patch I was able to use npm without any issues.
>How-To-Repeat:

>Fix:
--- flock.c-orig        2014-05-31 14:08:41.000000000 -0400
+++ flock.c     2014-05-31 14:07:12.000000000 -0400
@@ -207,7 +207,8 @@
        argv += optind;

        if ((lock & ~LOCK_NB) == 0)
-               usage("Missing lock type flag");
+               /* usage("Missing lock type flag"); */
+               lock |= LOCK_EX;

        switch (argc) {
        case 0:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: mspo@NetBSD.org
State-Changed-When: Tue, 29 Mar 2016 02:43:20 +0000
State-Changed-Why:
Christos did this Aug, 2014


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.