From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 546FF3858CD1; Fri, 11 Aug 2023 08:55:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 546FF3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1691744109; bh=IuI6FlAtxOdQyXxMg+DKgVKAcnhCwNpzHgqPbWEFx7c=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=nfhoPeDSVxFfXD54e5Hl8UGgKbDMAxm3tCcYc3XXfzehq87rl9MQf35NPj7I58Z9y PqTJLpbTvSvMX0MTqVfzrKApa7LEGXI8o4a/mwYilgrn+I2wKM8kCn3jshbMgoB7LO Q2RLDA25jBzYDcO1CIIiGJcvj1viX/+OPBXEdLFw= Received: by calimero.vinschen.de (Postfix, from userid 500) id 62BD4A80CAF; Fri, 11 Aug 2023 10:55:07 +0200 (CEST) Date: Fri, 11 Aug 2023 10:55:07 +0200 From: Corinna Vinschen To: Martin Wege Cc: cygwin@cygwin.com Subject: Re: Cygwin breaks net use Z: /delete in scripts? Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: Martin Wege , cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: First of all, do not send unsolicited email to my private address. Especially, please don't use my company email address. Keep Cygwin stuff on the cygwin list. On Aug 11 10:25, Martin Wege wrote: > Hello, > > Cygwin somehow breaks unmounting of network shares, but ONLY if the > net use /delete happens in a bash shell script. > > Example: > Mount SMB network share on Z: > Do not touch Z:! > > Then do a net use /delete in a bash script: > net use Z: /delete > Systemfehler 1794 aufgetreten. > Der Redirector wird verwendet und kann nicht aus dem Speicher entfernt werden. > > If I execute the net use Z: /delete in an interactive bash shell it works. > > Can anyone explain this? Something is wrong on your side, but no, I can't explain it. It's not related to Cygwin: $ cat > b.sh <