diff --git a/configure.ac b/configure.ac
index 2cacd06..1a6cc18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 
 
 AC_PREREQ(2.69)
-AC_INIT(davfs2, 1.6.1, http://savannah.nongnu.org/projects/davfs2)
+AC_INIT(davfs2, 1.6.x-snapshot, http://savannah.nongnu.org/projects/davfs2)
 AC_CONFIG_SRCDIR([src/cache.c])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE
diff --git a/man/Makefile.am b/man/Makefile.am
index ea10e83..ae5e785 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -43,10 +43,10 @@ edit = sed \
        -e 's|@GROUP[@]|$(dav_group)|g'
 
 manual5_DATA = davfs2.conf.5.gz
-manual8_DATA = mount.davfs.8.gz umount.davfs.8.gz
+manual8_DATA = mount.davfs.8.gz
 
-EXTRA_DIST = davfs2.conf.5 mount.davfs.8 umount.davfs.8 \
-             davfs2.conf.5.pot mount.davfs.8.pot umount.davfs.8.pot \
+EXTRA_DIST = davfs2.conf.5 mount.davfs.8 \
+             davfs2.conf.5.pot mount.davfs.8.pot \
              po4a.conf template.translator
 CLEANFILES = $(manual5_DATA) $(manual8_DATA)
 
diff --git a/man/de/Makefile.am b/man/de/Makefile.am
index 6965857..e9c30bc 100644
--- a/man/de/Makefile.am
+++ b/man/de/Makefile.am
@@ -41,12 +41,11 @@ edit = sed \
        -e 's|@GROUP[@]|$(dav_group)|g'
 
 manual5_DATA = davfs2.conf.5.gz
-manual8_DATA = mount.davfs.8.gz umount.davfs.8.gz
+manual8_DATA = mount.davfs.8.gz
 
-EXTRA_DIST = davfs2.conf.5 mount.davfs.8 umount.davfs.8 \
-             davfs2.conf.5.po mount.davfs.8.po umount.davfs.8.po \
-             davfs2.conf.5.translator mount.davfs.8.translator \
-             umount.davfs.8.translator
+EXTRA_DIST = davfs2.conf.5 mount.davfs.8 \
+             davfs2.conf.5.po mount.davfs.8.po \
+             davfs2.conf.5.translator mount.davfs.8.translator 
 CLEANFILES = $(manual5_DATA) $(manual8_DATA)
 
 %.gz: %
diff --git a/man/de/davfs2.conf.5.po b/man/de/davfs2.conf.5.po
index e605a56..4d055c0 100644
--- a/man/de/davfs2.conf.5.po
+++ b/man/de/davfs2.conf.5.po
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: davfs2 1.5.0\n"
-"POT-Creation-Date: 2020-08-06 17:59+0200\n"
+"POT-Creation-Date: 2021-10-24 10:51+0200\n"
 "PO-Revision-Date: 2020-08-06 17:59+0200\n"
 "Last-Translator: Werner Baumann <werner.baumann@onlinehome.de>\n"
 "Language-Team: \n"
@@ -205,8 +205,8 @@ msgstr ""
 "Wenn ein Wert eines der Sonderzeichen Leerzeichen, Tabulator, #, \\(rs oder "
 "\" enthält, muss diesem Zeichen ein Escape-Zeichen \\(rs vorangestellt "
 "werden. Also \\(cq\\(rs\\ \\(cq statt \\(cq\\ \\(cq, \\(cq\\(rs#\\(cq statt "
-"\\(cq#\\(cq, \\(cq\\(rs\\(rs\\(cq statt \\(cq\\(rs\\(cq und \\(cq\\(rs"
-"\"\\(cq statt \\(cq\"\\(cq."
+"\\(cq#\\(cq, \\(cq\\(rs\\(rs\\(cq statt \\(cq\\(rs\\(cq und "
+"\\(cq\\(rs\"\\(cq statt \\(cq\"\\(cq."
 
 # type: Plain text
 #. type: Plain text
@@ -1617,7 +1617,7 @@ msgstr "Beinhaltet config, kernel, cache und http."
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:575 mount.davfs.8:551 umount.davfs.8:79
+#: davfs2.conf.5:575 mount.davfs.8:548 umount.davfs.8:79
 #, no-wrap
 msgid "AUTHORS"
 msgstr "AUTOREN"
@@ -1634,20 +1634,20 @@ msgstr ""
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:581 mount.davfs.8:568 umount.davfs.8:84
+#: davfs2.conf.5:581 mount.davfs.8:565 umount.davfs.8:84
 #, no-wrap
 msgid "DAVFS2 HOME"
 msgstr "DAVFS2 HOME"
 
 # type: TH
 #. type: Plain text
-#: davfs2.conf.5:584 mount.davfs.8:571 umount.davfs.8:87
+#: davfs2.conf.5:584 mount.davfs.8:568 umount.davfs.8:87
 msgid "@PACKAGE_BUGREPORT@"
 msgstr "@PACKAGE_BUGREPORT@"
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:586 mount.davfs.8:573 umount.davfs.8:89
+#: davfs2.conf.5:586 mount.davfs.8:570 umount.davfs.8:89
 #, no-wrap
 msgid "SEE ALSO"
 msgstr "SIEHE AUCH"
diff --git a/man/de/umount.davfs.8.po b/man/de/umount.davfs.8.po
deleted file mode 100644
index 0c9fa57..0000000
--- a/man/de/umount.davfs.8.po
+++ /dev/null
@@ -1,284 +0,0 @@
-# #-#-#-#-#  umount.davfs.8.po (davfs2)  #-#-#-#-#
-# German translation of umount.davfs(8) man page.
-# Copyright (C) 2007, 2914 Werner Baumann
-# Werner Baumann <werner.baumann@onlinehome.de>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: davfs2 1.4.0\n"
-"POT-Creation-Date: 2015-02-01 11:54+0100\n"
-"PO-Revision-Date: 2014-08-23 20:16+0200\n"
-"Last-Translator: Werner Baumann <werner.baumann@onlinehome.de>\n"
-"Language-Team: \n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-# type: TH
-#. type: TH
-#: davfs2.conf.5:1 mount.davfs.8:1 umount.davfs.8:1
-#, no-wrap
-msgid "@PACKAGE_STRING@"
-msgstr "@PACKAGE_STRING@"
-
-# type: SH
-#. type: SH
-#: davfs2.conf.5:4 mount.davfs.8:3 umount.davfs.8:3
-#, no-wrap
-msgid "NAME"
-msgstr "BEZEICHNUNG"
-
-# type: SH
-#. type: SH
-#: davfs2.conf.5:9 mount.davfs.8:22 umount.davfs.8:20
-#, no-wrap
-msgid "DESCRIPTION"
-msgstr "BESCHREIBUNG"
-
-# type: SH
-#. type: SH
-#: davfs2.conf.5:568 mount.davfs.8:547 umount.davfs.8:79
-#, no-wrap
-msgid "AUTHORS"
-msgstr "AUTOREN"
-
-# type: SH
-#. type: SH
-#: davfs2.conf.5:574 mount.davfs.8:564 umount.davfs.8:84
-#, no-wrap
-msgid "DAVFS2 HOME"
-msgstr "DAVFS2 HOME"
-
-# type: TH
-#. type: Plain text
-#: davfs2.conf.5:577 mount.davfs.8:567 umount.davfs.8:87
-msgid "@PACKAGE_BUGREPORT@"
-msgstr "@PACKAGE_BUGREPORT@"
-
-# type: SH
-#. type: SH
-#: davfs2.conf.5:579 mount.davfs.8:569 umount.davfs.8:89
-#, no-wrap
-msgid "SEE ALSO"
-msgstr "SIEHE AUCH"
-
-# type: SH
-#. type: SH
-#: mount.davfs.8:8 umount.davfs.8:8
-#, no-wrap
-msgid "SYNOPSIS"
-msgstr "ÜBERSICHT"
-
-# type: SH
-#. type: SH
-#: mount.davfs.8:15 umount.davfs.8:15
-#, no-wrap
-msgid "SYNOPSIS (root only)"
-msgstr "ÜBERSICHT (nur für root)"
-
-# type: Plain text
-#. type: Plain text
-#: mount.davfs.8:60 umount.davfs.8:30
-msgid ""
-"I<dir> is the mountpoint where the WebDAV resource is mounted on.  It may be "
-"an absolute or relative path."
-msgstr ""
-"I<dir> ist der Einhängepunkt. Es kann eine absolute oder relative Pfadangabe "
-"sein."
-
-# type: SH
-#. type: SH
-#: mount.davfs.8:67 umount.davfs.8:51
-#, no-wrap
-msgid "OPTIONS"
-msgstr "OPTIONEN"
-
-# type: TP
-#. type: TP
-#: mount.davfs.8:69 umount.davfs.8:53
-#, no-wrap
-msgid "B<-V --version>"
-msgstr "B<-V --version>"
-
-# type: Plain text
-#. type: Plain text
-#: mount.davfs.8:72 umount.davfs.8:56
-msgid "Output version."
-msgstr "Zeige die Version an."
-
-# type: TP
-#. type: TP
-#: mount.davfs.8:73 umount.davfs.8:57
-#, no-wrap
-msgid "B<-h --help>"
-msgstr "B<-h --help>"
-
-# type: Plain text
-#. type: Plain text
-#: mount.davfs.8:76 umount.davfs.8:60
-msgid "Print a help message."
-msgstr "Zeige einen Hilfe-Text an."
-
-# type: SH
-#. type: SH
-#: mount.davfs.8:376 umount.davfs.8:67
-#, no-wrap
-msgid "FILES"
-msgstr "DATEIEN"
-
-# type: TP
-#. type: TP
-#: mount.davfs.8:437 umount.davfs.8:69
-#, no-wrap
-msgid "I<@SYS_RUN@>"
-msgstr "I<@SYS_RUN@>"
-
-# type: SH
-#. type: SH
-#: mount.davfs.8:540 umount.davfs.8:74
-#, no-wrap
-msgid "BUGS"
-msgstr "FEHLER"
-
-# type: TH
-#. type: TH
-#: umount.davfs.8:1
-#, no-wrap
-msgid "u@PROGRAM_NAME@"
-msgstr "u@PROGRAM_NAME@"
-
-# type: TH
-#. type: TH
-#: umount.davfs.8:1
-#, no-wrap
-msgid "2014-08-23"
-msgstr "2014-08-23"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:6
-msgid "u@PROGRAM_NAME@ - Umount-helper to unmount a @PACKAGE@ file system"
-msgstr "u@PROGRAM_NAME@ - Umount-Hilfsprogramm für @PACKAGE@ Dateisysteme"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:11
-msgid "B<u@PROGRAM_NAME@ [-h | --help] [-V | --version]>"
-msgstr "B<u@PROGRAM_NAME@ [-h | --help] [-V | --version]>"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:13
-msgid "B<umount >I<dir>"
-msgstr "B<umount >I<dir>"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:18
-msgid "B<u@PROGRAM_NAME@ >I<dir>"
-msgstr "B<u@PROGRAM_NAME@ >I<dir>"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:26
-msgid ""
-"B<u@PROGRAM_NAME@> is a umount helper program. It is called by the "
-"B<umount>(8) command. Its purpose is to prevent the umount command from "
-"returning unless B<@PROGRAM_NAME@> has synchronized all its cached files "
-"with the webdav server."
-msgstr ""
-"B<u@PROGRAM_NAME@> ist ein Hilfsprogramm, das von B<umount>(8)  aufgerufen "
-"wird. Es soll verhindern, dass das umount-Kommando zurück kehrt, bevor "
-"B<@PROGRAM_NAME@> alle geänderten Dateien aus dem Cache auf den WebDAV-"
-"Server zurück sichern konnte."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:39
-msgid ""
-"While for local file systems B<umount>(8) will only return when all cached "
-"data have been written to disk, this is not automatically true for a mounted "
-"B<@PACKAGE@> file system. With this umount helper the user can rely on the "
-"familiar behaviour of B<umount>(8). To inform the operating system that the "
-"file system uses a network connection, you should always use the B<_netdev> "
-"option, when mounting as B<@PACKAGE@> file system."
-msgstr ""
-"Bei lokalen Dateisystemen kehrt B<umount>(8) erst zurück, wenn alle Daten "
-"aus dem Cache auf die Festplatte geschrieben sind. Dies funkioniert bei "
-"einem B<@PACKAGE@>-Dateisystem nicht automatisch. Mit diesem Hilfsprogramm "
-"kann sich der Benutzer auf das bekannte Verhalten von B<umount>(8) "
-"verlassen. Es sollte auch immer mit der Option B<_netdev> eingehängt werden, "
-"damit das Betriebssystem darüber informiert wird, dass das B<@PACKAGE@>-"
-"Dateisystem eine Netzwerkverbindung braucht."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:43
-msgid ""
-"Depending on the amount of data and the quality of the connection, "
-"unmounting a B<@PACKAGE@> file system may take some seconds up to some hours."
-msgstr ""
-"Abhängig von der Datenmenge und der Qualität der Netzwerkverbindung kann das "
-"Aushängen ein paar Sekunden, aber auch einige Stunden dauern."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:49
-msgid ""
-"If the B<@PROGRAM_NAME@> daemon encountered serious errors, "
-"B<u@PROGRAM_NAME@> may return an error instead of unmounting the file "
-"system. In this case try B<umount -i>. The B<-i> option will prevent "
-"B<umount>(8) from calling B<u@PROGRAM_NAME@>."
-msgstr ""
-"Wenn der B<@PROGRAM_NAME@>-Hintergrundprozess ernste Probleme hat, kann "
-"B<u@PROGRAM_NAME@> möglicherweise das Dateisystem nicht aushängen, sondern "
-"meldet einen Fehler. Versuche es in diesem Fall mit B<umount -i>. Die Option "
-"B<-i> hindert B<umount>(8) daran, B<u@PROGRAM_NAME@> aufzurufen."
-
-# type: TP
-#. type: TP
-#: umount.davfs.8:61
-#, no-wrap
-msgid "B<-f -l -n -r -v -t>"
-msgstr "B<-f -l -n -r -v -t>"
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:65
-msgid ""
-"This options are B<ignored>. They are only recognized for compatibility with "
-"B<umount>(8)."
-msgstr ""
-"Dies Optionen dienen nur der Kompatibilität mit B<umount>(8) und werden "
-"ignoriert."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:72
-msgid "PID-files of running B<u@PROGRAM_NAME@> processes are looked up here."
-msgstr ""
-"Die PID-Dateien der laufenden B<@PROGRAM_NAME@>-Hintergrundprozesse werden "
-"in diesem Verzeichnis gesucht."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:77
-msgid "No known bugs."
-msgstr "Derzeit keine bekannten."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:82
-msgid ""
-"This man page was written by Werner Baumann E<lt>werner.baumann@onlinehome."
-"deE<gt>."
-msgstr ""
-"Diese Handbuch hat Werner Baumann E<lt>werner.baumann@onlinehome.deE<gt> "
-"geschrieben."
-
-# type: Plain text
-#. type: Plain text
-#: umount.davfs.8:94
-msgid "B<@PROGRAM_NAME@>(8), B<umount>(8), B<@CONFIGFILE@>(5), B<fstab>(5)"
-msgstr "B<@PROGRAM_NAME@>(8), B<umount>(8), B<@CONFIGFILE@>(5), B<fstab>(5)"
diff --git a/man/de/umount.davfs.8.translator b/man/de/umount.davfs.8.translator
deleted file mode 100644
index bf18e3c..0000000
--- a/man/de/umount.davfs.8.translator
+++ /dev/null
@@ -1,4 +0,0 @@
-PO4A-HEADER:mode=after;position=^\.SH AUTOREN;beginboundary=^\.SH
-.SH ÜBERSETZER
-Das Handbuch wurde von Werner Baumann <werner.baumann@onlinehome.de>
-übersetzt. 2009-04-27
diff --git a/man/es/Makefile.am b/man/es/Makefile.am
index 4a427b6..d86d3af 100644
--- a/man/es/Makefile.am
+++ b/man/es/Makefile.am
@@ -41,12 +41,11 @@ edit = sed \
        -e 's|@GROUP[@]|$(dav_group)|g'
 
 manual5_DATA = davfs2.conf.5.gz
-#manual8_DATA = mount.davfs.8.gz umount.davfs.8.gz
+#manual8_DATA = mount.davfs.8.gz 
 
-#EXTRA_DIST = davfs2.conf.5 mount.davfs.8 umount.davfs.8 \
-#             davfs2.conf.5.po mount.davfs.8.po umount.davfs.8.po \
-#             davfs2.conf.5.translator mount.davfs.8.translator \
-#             umount.davfs.8.translator
+#EXTRA_DIST = davfs2.conf.5 mount.davfs.8 \
+#             davfs2.conf.5.po mount.davfs.8.po \
+#             davfs2.conf.5.translator mount.davfs.8.translator
 EXTRA_DIST = davfs2.conf.5 davfs2.conf.5.po
 CLEANFILES = $(manual5_DATA) $(manual8_DATA)
 
diff --git a/man/es/davfs2.conf.5.po b/man/es/davfs2.conf.5.po
index 20f70b2..fcbaddb 100644
--- a/man/es/davfs2.conf.5.po
+++ b/man/es/davfs2.conf.5.po
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: davfs2.conf.5\n"
-"POT-Creation-Date: 2020-08-06 17:59+0200\n"
+"POT-Creation-Date: 2021-10-24 10:51+0200\n"
 "PO-Revision-Date: 2007-04-26 01:24-0300\n"
 "Last-Translator: Luciano Bello <luciano@linux.org.ar>\n"
 "Language-Team: Español <es@li.org>\n"
@@ -213,8 +213,8 @@ msgid ""
 msgstr ""
 "Si el parámetro contiene algún caracter especial como espacio, tab, #, "
 "\\(rs, o \", éste debe ser escapado por el prefijo \\(rs. Use \\(cq\\(rs\\ "
-"\\(cq en vez de \\(cq\\ \\(cq, \\(cq\\(rs#\\(cq en vez de \\(cq#\\(cq, \\(cq"
-"\\(rs\\(rs\\(cq en vez de \\(cq\\(rs\\(cq y \\(cq\\(rs\"\\(cq "
+"\\(cq en vez de \\(cq\\ \\(cq, \\(cq\\(rs#\\(cq en vez de \\(cq#\\(cq, "
+"\\(cq\\(rs\\(rs\\(cq en vez de \\(cq\\(rs\\(cq y \\(cq\\(rs\"\\(cq "
 
 # type: Plain text
 #. type: Plain text
@@ -1536,7 +1536,7 @@ msgstr ""
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:575 mount.davfs.8:551 umount.davfs.8:79
+#: davfs2.conf.5:575 mount.davfs.8:548 umount.davfs.8:79
 #, no-wrap
 msgid "AUTHORS"
 msgstr "AUTORES"
@@ -1553,20 +1553,20 @@ msgstr ""
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:581 mount.davfs.8:568 umount.davfs.8:84
+#: davfs2.conf.5:581 mount.davfs.8:565 umount.davfs.8:84
 #, no-wrap
 msgid "DAVFS2 HOME"
 msgstr "DAVFS2 HOME"
 
 # type: TH
 #. type: Plain text
-#: davfs2.conf.5:584 mount.davfs.8:571 umount.davfs.8:87
+#: davfs2.conf.5:584 mount.davfs.8:568 umount.davfs.8:87
 msgid "@PACKAGE_BUGREPORT@"
 msgstr "@PACKAGE_BUGREPORT@"
 
 # type: SH
 #. type: SH
-#: davfs2.conf.5:586 mount.davfs.8:573 umount.davfs.8:89
+#: davfs2.conf.5:586 mount.davfs.8:570 umount.davfs.8:89
 #, no-wrap
 msgid "SEE ALSO"
 msgstr "VER TAMBIÉN"
diff --git a/man/umount.davfs.8 b/man/umount.davfs.8
deleted file mode 100644
index 8f8c912..0000000
--- a/man/umount.davfs.8
+++ /dev/null
@@ -1,94 +0,0 @@
-.TH u@PROGRAM_NAME@ 8 "2014-08-23" @PACKAGE_STRING@
-
-.SH NAME
-
-u@PROGRAM_NAME@ \- Umount-helper to unmount a @PACKAGE@ file system
-
-
-.SH SYNOPSIS
-
-.B u@PROGRAM_NAME@ [-h | --help] [-V | --version]
-.br
-.BI "umount " dir
-
-
-.SH SYNOPSIS (root only)
-
-.BI "u@PROGRAM_NAME@ " dir
-
-
-.SH DESCRIPTION
-
-\fBu@PROGRAM_NAME@\fR is a umount helper program. It is called by the
-\fBumount\fR(8) command. Its purpose is to prevent the umount command
-from returning unless \fB@PROGRAM_NAME@\fR has synchronized all its
-cached files with the webdav server.
-
-.PP
-\fIdir\fP is the mountpoint where the WebDAV resource is mounted on.
-It may be an absolute or relative path.
-
-.PP
-While for local file systems \fBumount\fR(8) will only return when all
-cached data have been written to disk, this is not automatically true
-for a mounted \fB@PACKAGE@\fR file system. With this umount helper the
-user can rely on the familiar behaviour of \fBumount\fR(8). To inform
-the operating system that the file system uses a network connection,
-you should always use the \fB_netdev\fR option, when mounting as
-\fB@PACKAGE@\fR file system.
-
-.PP
-Depending on the amount of data and the quality of the connection, unmounting
-a \fB@PACKAGE@\fR file system may take some seconds up to some hours.
-
-.PP
-If the \fB@PROGRAM_NAME@\fR daemon encountered serious errors,
-\fBu@PROGRAM_NAME@\fR may return an error instead of unmounting the file
-system. In this case try \fBumount -i\fR. The \fB-i\fR option will prevent
-\fBumount\fR(8) from calling \fBu@PROGRAM_NAME@\fR.
-
-
-.SH OPTIONS
-
-.TP
-.B -V --version
-Output version.
-
-.TP
-.B -h --help
-Print a help message.
-
-.TP
-.B -f -l -n -r -v -t
-This options are \fBignored\fR. They are only recognized for compatibility
-with \fBumount\fR(8).
-
-
-.SH FILES
-
-.TP
-.I @SYS_RUN@
-PID-files of running \fBu@PROGRAM_NAME@\fR processes are looked up here.
-
-
-.SH BUGS
-
-No known bugs.
-
-
-.SH AUTHORS
-
-This man page was written by Werner Baumann <werner.baumann@onlinehome.de>.
-
-
-.SH DAVFS2 HOME
-
-@PACKAGE_BUGREPORT@
-
-
-.SH SEE ALSO
-
-.BR @PROGRAM_NAME@ (8),
-.BR umount (8),
-.BR @CONFIGFILE@ (5),
-.BR fstab (5)
diff --git a/man/umount.davfs.8.pot b/man/umount.davfs.8.pot
deleted file mode 100644
index 36c302b..0000000
--- a/man/umount.davfs.8.pot
+++ /dev/null
@@ -1,226 +0,0 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2021-10-24 10:51+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. type: TH
-#: davfs2.conf.5:1 mount.davfs.8:1 umount.davfs.8:1
-#, no-wrap
-msgid "@PACKAGE_STRING@"
-msgstr ""
-
-#. type: SH
-#: davfs2.conf.5:4 mount.davfs.8:3 umount.davfs.8:3
-#, no-wrap
-msgid "NAME"
-msgstr ""
-
-#. type: SH
-#: davfs2.conf.5:9 mount.davfs.8:22 umount.davfs.8:20
-#, no-wrap
-msgid "DESCRIPTION"
-msgstr ""
-
-#. type: SH
-#: davfs2.conf.5:575 mount.davfs.8:548 umount.davfs.8:79
-#, no-wrap
-msgid "AUTHORS"
-msgstr ""
-
-#. type: SH
-#: davfs2.conf.5:581 mount.davfs.8:565 umount.davfs.8:84
-#, no-wrap
-msgid "DAVFS2 HOME"
-msgstr ""
-
-#. type: Plain text
-#: davfs2.conf.5:584 mount.davfs.8:568 umount.davfs.8:87
-msgid "@PACKAGE_BUGREPORT@"
-msgstr ""
-
-#. type: SH
-#: davfs2.conf.5:586 mount.davfs.8:570 umount.davfs.8:89
-#, no-wrap
-msgid "SEE ALSO"
-msgstr ""
-
-#. type: SH
-#: mount.davfs.8:8 umount.davfs.8:8
-#, no-wrap
-msgid "SYNOPSIS"
-msgstr ""
-
-#. type: SH
-#: mount.davfs.8:15 umount.davfs.8:15
-#, no-wrap
-msgid "SYNOPSIS (root only)"
-msgstr ""
-
-#. type: Plain text
-#: mount.davfs.8:60 umount.davfs.8:30
-msgid ""
-"I<dir> is the mountpoint where the WebDAV resource is mounted on.  It may be "
-"an absolute or relative path."
-msgstr ""
-
-#. type: SH
-#: mount.davfs.8:67 umount.davfs.8:51
-#, no-wrap
-msgid "OPTIONS"
-msgstr ""
-
-#. type: TP
-#: mount.davfs.8:69 umount.davfs.8:53
-#, no-wrap
-msgid "B<-V --version>"
-msgstr ""
-
-#. type: Plain text
-#: mount.davfs.8:72 umount.davfs.8:56
-msgid "Output version."
-msgstr ""
-
-#. type: TP
-#: mount.davfs.8:73 umount.davfs.8:57
-#, no-wrap
-msgid "B<-h --help>"
-msgstr ""
-
-#. type: Plain text
-#: mount.davfs.8:76 umount.davfs.8:60
-msgid "Print a help message."
-msgstr ""
-
-#. type: SH
-#: mount.davfs.8:377 umount.davfs.8:67
-#, no-wrap
-msgid "FILES"
-msgstr ""
-
-#. type: TP
-#: mount.davfs.8:438 umount.davfs.8:69
-#, no-wrap
-msgid "I<@SYS_RUN@>"
-msgstr ""
-
-#. type: SH
-#: mount.davfs.8:541 umount.davfs.8:74
-#, no-wrap
-msgid "BUGS"
-msgstr ""
-
-#. type: TH
-#: umount.davfs.8:1
-#, no-wrap
-msgid "u@PROGRAM_NAME@"
-msgstr ""
-
-#. type: TH
-#: umount.davfs.8:1
-#, no-wrap
-msgid "2014-08-23"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:6
-msgid "u@PROGRAM_NAME@ - Umount-helper to unmount a @PACKAGE@ file system"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:11
-msgid "B<u@PROGRAM_NAME@ [-h | --help] [-V | --version]>"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:13
-msgid "B<umount >I<dir>"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:18
-msgid "B<u@PROGRAM_NAME@ >I<dir>"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:26
-msgid ""
-"B<u@PROGRAM_NAME@> is a umount helper program. It is called by the "
-"B<umount>(8) command. Its purpose is to prevent the umount command from "
-"returning unless B<@PROGRAM_NAME@> has synchronized all its cached files "
-"with the webdav server."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:39
-msgid ""
-"While for local file systems B<umount>(8) will only return when all cached "
-"data have been written to disk, this is not automatically true for a mounted "
-"B<@PACKAGE@> file system. With this umount helper the user can rely on the "
-"familiar behaviour of B<umount>(8). To inform the operating system that the "
-"file system uses a network connection, you should always use the B<_netdev> "
-"option, when mounting as B<@PACKAGE@> file system."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:43
-msgid ""
-"Depending on the amount of data and the quality of the connection, "
-"unmounting a B<@PACKAGE@> file system may take some seconds up to some hours."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:49
-msgid ""
-"If the B<@PROGRAM_NAME@> daemon encountered serious errors, "
-"B<u@PROGRAM_NAME@> may return an error instead of unmounting the file "
-"system. In this case try B<umount -i>. The B<-i> option will prevent "
-"B<umount>(8) from calling B<u@PROGRAM_NAME@>."
-msgstr ""
-
-#. type: TP
-#: umount.davfs.8:61
-#, no-wrap
-msgid "B<-f -l -n -r -v -t>"
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:65
-msgid ""
-"This options are B<ignored>. They are only recognized for compatibility with "
-"B<umount>(8)."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:72
-msgid "PID-files of running B<u@PROGRAM_NAME@> processes are looked up here."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:77
-msgid "No known bugs."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:82
-msgid ""
-"This man page was written by Werner Baumann E<lt>werner.baumann@onlinehome."
-"deE<gt>."
-msgstr ""
-
-#. type: Plain text
-#: umount.davfs.8:94
-msgid "B<@PROGRAM_NAME@>(8), B<umount>(8), B<@CONFIGFILE@>(5), B<fstab>(5)"
-msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 9968a2f..3925231 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,12 +25,11 @@ pkglocalstatedir = $(dav_localstatedir)/mount.davfs
 pkgsyscachedir = $(dav_syscachedir)/@PACKAGE@
 ssbindir = @ssbindir@
 
-sbin_PROGRAMS = mount.davfs umount.davfs
+sbin_PROGRAMS = mount.davfs
 mount_davfs_SOURCES = cache.c \
         dav_fuse.c kernel_interface.c mount_davfs.c webdav.c \
         cache.h defaults.h fuse_kernel.h \
         kernel_interface.h mount_davfs.h webdav.h
-umount_davfs_SOURCES = umount_davfs.c defaults.h
 
 AM_CFLAGS = -Wall -Werror=format-security \
         -fstack-protector-strong --param=ssp-buffer-size=4
@@ -55,11 +54,9 @@ install-exec-hook:
 	if test "$(sbindir)" != "$(ssbindir)"; then \
 	  $(mkinstalldirs) $(DESTDIR)$(ssbindir); \
 	  $(LN_S) -f $(sbindir)/mount.davfs $(DESTDIR)$(ssbindir)/mount.davfs; \
-	  $(LN_S) -f $(sbindir)/umount.davfs $(DESTDIR)$(ssbindir)/umount.davfs; \
 	fi
 
 uninstall-hook:
 	if test "$(sbindir)" != "$(ssbindir)"; then \
 	  rm -f $(DESTDIR)$(ssbindir)/mount.davfs; \
-	  rm -f $(DESTDIR)$(ssbindir)/umount.davfs; \
 	fi
diff --git a/src/dav_fuse.c b/src/dav_fuse.c
index 734bc1f..84aa58b 100644
--- a/src/dav_fuse.c
+++ b/src/dav_fuse.c
@@ -21,6 +21,8 @@
 #include "config.h"
 
 #include <errno.h>
+#include <error.h>
+
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -43,6 +45,10 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
@@ -147,13 +153,11 @@ set_attr(struct fuse_attr *attr, const dav_node *node);
 /*==================*/
 
 void
-dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
+dav_fuse_loop(int device, size_t bufsize, time_t idle_time,
               dav_is_mounted_fn is_mounted, volatile int *keep_on_running,
               int dbg)
 {
     debug = dbg;
-    char *mountpoint = mpoint;
-    int unmounting = 0;
     if (debug)
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "fuse kernel version 7");
 
@@ -181,15 +185,11 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
         if (debug)
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "SELECT: %i", ret);
 
-        if (!*keep_on_running && !unmounting) {
-            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), _("unmounting %s"),
-                   mountpoint);
-            unmounting = 1;
-            pid_t pid = fork();
-            if (pid == 0) {
-                execl("/bin/umount", "umount", "-il", mountpoint, NULL);
-                _exit(EXIT_FAILURE);
-            }
+        if (!*keep_on_running) {
+            /* Caller will close fuse dev, which will lead to immediate
+             * I/O errors on accesses to the file system
+             */
+            break;
         }
 
         if (ret > 0) {
@@ -1048,3 +1048,4 @@ set_attr(struct fuse_attr *attr, const dav_node *node)
     attr->gid = node->gid;
     attr->rdev = 0;
 }
+
diff --git a/src/kernel_interface.h b/src/kernel_interface.h
index b58e793..d52534b 100644
--- a/src/kernel_interface.h
+++ b/src/kernel_interface.h
@@ -63,7 +63,6 @@ dav_init_kernel_interface(int *dev, size_t *buf_size, const char *url,
 
 /* Message loop for fuse kernel module with major number 7.
    device          : File descriptor of the open fuse device.
-   mpoint          : String with the name of the mount point.
    buf_size        : Size of the buffer for communication with the kernel
                      module.
    idle_t          : Time to wait for upcalls before calling dav_tidy_cache().
@@ -71,7 +70,7 @@ dav_init_kernel_interface(int *dev, size_t *buf_size, const char *url,
    keep_on_running : Pointer to run flag.
    dbg             : send debug messages to syslog if dbg != 0 */
 void
-dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
+dav_fuse_loop(int device, size_t bufsize, time_t idle_time,
               dav_is_mounted_fn is_mounted, volatile int *keep_on_running,
               int dbg);
 
diff --git a/src/mount_davfs.c b/src/mount_davfs.c
index 2970844..9839a8d 100644
--- a/src/mount_davfs.c
+++ b/src/mount_davfs.c
@@ -58,6 +58,7 @@
 #endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#include <sys/wait.h>
 #endif
 
 #ifdef HAVE_SYS_FILE_H
@@ -232,41 +233,58 @@ main(int argc, char *argv[])
         check_fstab(args);
 
     parse_config(args);
+    // now, args->debug is correctly initialized
 
     check_dirs(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "dirs OK");
 
     check_permissions(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "permissions OK");
 
     parse_secrets(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "secrets OK");
 
     pidfile = check_double_mounts(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "double mounts pid file: %s", pidfile);
 
     change_persona(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "persona OK");
 
     dav_init_webdav(args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "webdav initialized");
 
     dav_init_cache(args, mpoint);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "cache initialized");
 
     int dev = 0;
     size_t buf_size = args->buf_size * 1024;
     dav_init_kernel_interface(&dev, &buf_size, url, mpoint, args);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "kernel interface OK");
 
     if (args->debug & DAV_DBG_CONFIG)
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Fork into daemon mode");
     pid_t childpid = fork();
     if (childpid > 0) {
-
-        if (args->debug & DAV_DBG_CONFIG)
+       if (args->debug & DAV_DBG_CONFIG)
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-                   "Parent: parent pid: %i, child pid: %i", getpid(), childpid);
+                       "Parent: writing mtab entry");
+        write_mtab_entry(args);
 
+        // terminate launcher
         if (args->debug & DAV_DBG_CONFIG)
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-                   "Parent: writing mtab entry");
-        write_mtab_entry(args);
+                   "Launcher: parent pid: %i, child pid: %i", getpid(), childpid);
 
         if (args->debug & DAV_DBG_CONFIG)
-            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Parent: leaving now");
+            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Launcher: leaving now");
         delete_args(args);
         exit(EXIT_SUCCESS);
 
@@ -275,6 +293,7 @@ main(int argc, char *argv[])
         error(EXIT_FAILURE, errno, _("can't start daemon process"));
     }
 
+    // here we are the looper process, dropping resuid 0
     if (args->debug & DAV_DBG_CONFIG)
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Set signal handler");
     struct sigaction action;
@@ -338,7 +357,7 @@ main(int argc, char *argv[])
     if (!ret) {
         if (debug & DAV_DBG_CONFIG)
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Starting message loop");
-        dav_fuse_loop(dev, mpoint, buf_size, idle_time, is_mounted,
+        dav_fuse_loop(dev, buf_size, idle_time, is_mounted,
                       &keep_on_running, debug & DAV_DBG_KERNEL);
     }
 
@@ -346,6 +365,7 @@ main(int argc, char *argv[])
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Closing");
     dav_close_cache(&got_sigterm);
     dav_close_webdav();
+    close(dev);
     if (debug & DAV_DBG_CONFIG)
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Removing %s", pidfile);
     remove(pidfile);
@@ -374,7 +394,8 @@ dav_user_input_hidden(const char *prompt)
         return NULL;
     printf("\n");
 
-    if (len < 0) abort();
+    if (len < 0)
+        error(EXIT_FAILURE, errno, "Unable to read from stdin");
     if (len > 0 && *(line + len - 1) == '\n')
         *(line + len - 1) = '\0';
 
@@ -646,10 +667,32 @@ check_double_mounts(dav_args *args)
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "PID file: %s", pidf);
 
     FILE *file = fopen(pidf, "r");
-    if (file)
-        error(EXIT_FAILURE, 0, _("found PID file %s.\n"
-              "Either %s is used by another process,\n"
-              "or another mount process ended irregular"), pidf, mpoint);
+    if (file) {
+        char pidstring[20];
+        pid_t pid;
+        if (fgets(pidstring, sizeof(pidstring), file) == NULL) {
+            pid = 0L;
+        } else {
+            pid = atol(pidstring);
+        }
+        /* check if we can send a signal to the process in pid file.
+           We will ignore the pid file exactly if the process doesn't exist.
+           We'll wait up to 5 seconds in case we have an old instance
+           in process of shutting down.
+        */
+        int attempt = 0;
+        while (kill(pid, 0) == 0 || errno != ESRCH) {
+            /* todo we might want to check if the process is unrelated and
+                   only accidentally has the same pid. */
+            if (5 < ++attempt) {
+                error(EXIT_FAILURE, 0, _("found PID file %s.\n"
+                      "Either %s is used by another process,\n"
+                      "or another mount process ended irregular"), pidf, mpoint);
+            }
+            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_WARNING), "Process %d found in PID file %s still running (attempt %d)", pid, pidf, attempt);
+            sleep(1);
+        }
+    }
 
     return pidf;
 }
@@ -914,7 +957,7 @@ parse_commandline(int argc, char *argv[])
         mpoint = canonicalize_file_name(argv[i]);
         if (!mpoint)
             error(EXIT_FAILURE, 0,
-                  _("can't evaluate path of mount point %s"), mpoint);
+                  _("can't evaluate path of mount point %s"), argv[i]);
         break;
     default:
         error(0, 0, _("too many arguments"));
@@ -940,7 +983,7 @@ parse_commandline(int argc, char *argv[])
     if (!args->port)
         args->port = ne_uri_defaultport(args->scheme);
 
-    return args;       
+    return args;
 }
 
 
@@ -969,6 +1012,11 @@ parse_config(dav_args *args)
         read_config(args, args->conf, 0);
     }
 
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
+               "read configuration from %s and %s, debug setting: %x",
+               DAV_SYS_CONF_DIR "/" DAV_CONFIG, args->conf, args->debug);
+
     args->mopts |= DAV_MOPTS;
 
     args->dir_mode |= S_IFDIR;
@@ -1078,14 +1126,22 @@ parse_config(dav_args *args)
                   args->clicert);
     }
 
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read certificates");
+
     if (getuid() == 0 && !args->p_host) {
         proxy_from_env(args);
         read_no_proxy_list(args);
+        if (args->debug & DAV_DBG_CONFIG)
+            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read proxy from env");
     }
 
     if (!args->p_host)
         args->useproxy = 0;
 
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read proxy settings");
+
     if (!args->cache_dir) {
         args->cache_dir = ne_strdup(args->sys_cache);
     } else if (*args->cache_dir == '~') {
@@ -1097,6 +1153,9 @@ parse_config(dav_args *args)
         args->cache_dir = f;
     }
 
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read cache dir");
+
     if (args->debug & DAV_DBG_CONFIG)
         log_dbg_config(args);
 }
@@ -1111,11 +1170,16 @@ parse_secrets(dav_args *args)
     if (seteuid(0) != 0)
         error(EXIT_FAILURE, errno, _("can't change effective user id"));
     read_secrets(args, DAV_SYS_CONF_DIR "/" DAV_SECRETS);
+    if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read system secrets from %s", DAV_SYS_CONF_DIR "/" DAV_SECRETS);
+
     if (seteuid(getuid()) != 0)
         error(EXIT_FAILURE, errno, _("can't change effective user id"));
 
     if (args->secrets) {
         read_secrets(args, args->secrets);
+        if (args->debug & DAV_DBG_CONFIG)
+            syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read user secrets from %s", args->secrets);
     }
 
     if (args->cl_username) {
@@ -1183,7 +1247,9 @@ parse_secrets(dav_args *args)
                "  p_passwd: %s", args->p_passwd);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
                "  clicert_pw: %s", args->clicert_pw);
-    }
+    } else if (args->debug & DAV_DBG_CONFIG)
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read all secrets");
+
 }
 
 
@@ -1205,7 +1271,7 @@ save_pid(void)
 }
 
 
-/* Signal handler for the daemon process.
+/* Signal handler for the unprivileged looper process.
    Sets global variable keep_on_running to 0, so the message loop will stop
    and the daemon will terminate gracefully. */
 static void
@@ -1218,7 +1284,6 @@ termination_handler(int signo)
     got_sigterm = 1;
 }
 
-
 /* Adds an entry to _PATH_MOUNTED for the mounted file system.
    If _PATH_MOUNTED is a symbolic link to /proc/mounts it will write an
    entry into /var/run/mount/utab instead.
@@ -1777,8 +1842,6 @@ new_args(void)
 static void
 log_dbg_config(dav_args *args)
 {
-    syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-           "%s", args->cmdline);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
            "Configuration:");
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
@@ -2593,7 +2656,8 @@ user_input(const char *prompt)
     char *line = NULL;
     size_t n = 0;
     ssize_t len = getline(&line, &n, stdin);
-    if (len < 0) abort();
+    if (len < 0)
+        error(EXIT_FAILURE, errno, "Unable to read from stdin");
     if (len > 0 && *(line + len - 1) == '\n')
         *(line + len - 1) = '\0';
 
