tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `tramp_perl_file_attributes /root/ integer' returns with error


From: Terrence Brannon
Subject: Re: `tramp_perl_file_attributes /root/ integer' returns with error
Date: Thu, 15 Jul 2010 09:35:01 -0400



On Wed, Jul 14, 2010 at 10:19 AM, Michael Albinus <address@hidden> wrote:
Terrence Brannon <address@hidden> writes:

> 09:31:13.331959 tramp-send-command (6) # tramp_perl_file_attributes /root/ integer 2>/dev/null; echo tramp_exit_status $?
> 09:31:13.471961 tramp-wait-for-regexp (6) #
> tramp_exit_status 255
> ///4e226762a89429956796e848e1d0647a#$

Unfortunately, this doesn't show us what happens. Could you, please,
change in `tramp-send-command-and-check' the line

          (if command (if dont-suppress-err "; " " 2>/dev/null; ") "")

to

          (if command (if dont-suppress-err "; " " 2>/tmp/123; ") "")

and try to investigate, what error has been written?

(defun tramp-send-command-and-check
  (vec command &optional subshell dont-suppress-err)
  "Run COMMAND and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit status.  If
COMMAND is nil, just sends `echo $?'.  Returns the exit status found.

If the optional argument SUBSHELL is non-nil, the command is
executed in a subshell, ie surrounded by parentheses.  If
DONT-SUPPRESS-ERR is non-nil, stderr won't be sent to /dev/null."
  (tramp-send-command
   vec
   (concat (if subshell "( " "")
  command
  (if command (if dont-suppress-err "; " " 2>/tmp/123; ") "")
  "echo tramp_exit_status $?"
  (if subshell " )" "")))
  (with-current-buffer (tramp-get-connection-buffer vec)
    (goto-char (point-max))
    (unless (re-search-backward "tramp_exit_status [0-9]+" nil t)
      (tramp-error
       vec 'file-error "Couldn't find exit status of `%s'" command))
    (skip-chars-forward "^ ")
    (prog1
     (read (current-buffer))
     (let (buffer-read-only) (delete-region (match-beginning 0) (point-max))))))


 

Thanks, and best regards, Michael.


It was a zero-length file ... 

--
Search! Search! [DuckDuckGo](http://duckduckgo.com/?t=terrencebrannon)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]