Jump to content

p4 change -i doesn't work in linux

  • Please log in to reply
1 reply to this topic

#1 yaroslav-serious



  • Members
  • Pip
  • 1 posts

Posted 25 September 2019 - 11:01 PM

If I run this in windows p4 --field "Description=MYDESCRIPTION" change -o | p4 change -i it works, like a charm. On linux it just hands with stdin still open.

If I run it manually on windows p4 change -i input template and send Ctrl+Z, stdin is closed and either there is parsing error or changelist is created. Linux version does not react on Ctrl+D (unix EOF) or on Ctrl+Z (by manually sending code 26 to the stdin).

Is it broken or there is an undocumented way to close the input stream?

I found this old perl script from 1998 [0], suggesting that it was properly reacting on EOF or EOT sygnals, but running it reveals that 2019 version still hangs.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:		18.04
Codename:	   bionic
# p4 -V
Perforce - The Fast Software Configuration Management System.
Copyright 1995-2019 Perforce Software.  All rights reserved.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)
Version of OpenSSL Libraries: OpenSSL 1.1.1a  20 Nov 2018
See 'p4 help [ -l ] legal' for additional license information on
these licenses and others.
Extensions/scripting support built-in.
Parallel sync threading built-in.
Rev. P4/LINUX26X86_64/2019.1/1845410 (2019/08/28).

[0] http://maillist.perf...ber/001655.html

#2 Jacob91



  • Members
  • Pip
  • 1 posts

Posted 19 November 2019 - 04:55 AM

Put quotes around the variable.

sudo bash -c "echo -e '$interfaces' > /etc/network/interfaces"
Outside of a quoted string, \n gets replaced with n.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users